Giter Site home page Giter Site logo

2020a_c04_ch3_exercices's Introduction

Open in Gitpod

Exercices en vrac (chapitre 3)

Avant de commencer. Consulter les instructions à suivre dans instructions.md

Objectifs

Compléter les quelques exercices suivants en modifiant le code de exercice.py:

  1. Calculer la racine carré et le carré d'un nombre
  2. Calculer la moyenne de 3 nombres donnés
  3. Convertir en radians un angle fourni au départ en degrés, minutes, secondes
  4. Convertir en degrés, minutes, secondes un angle fourni au départ en radians
  5. Convertir en degrés Celsius une température exprimée au départ en degrés Fahrenheit et vice-versa

À compléter

Vous devez compléter les fonctions suivantes du fichier exercice.py.

def square_root(a: float) -> float:
    return 0.0

def square(a: float) -> float:
    return 0.0

def average(a: float, b: float, c: float) -> float:
    return 0.0

def to_radians(angle_degs: float, angle_mins: float, angle_secs: float) -> float:
    return 0.0

def to_degrees(angle_rads: float) -> tuple:
    return 0.0, 0.0, 0.0

def to_celsius(temperature: float) -> float:
    return 0.0

def to_farenheit(temperature: float) -> float:
    return 0.0

Connaissances utiles

Opérateurs arithmétiques de base

https://www.w3schools.com/python/python_operators.asp

Documentation du module math

https://docs.python.org/3/library/math.html

Formule de conversion Celsius vers Farenheit

Tf = Tc x 1.8 + 32

2020a_c04_ch3_exercices's People

Contributors

kegaub avatar

Watchers

James Cloos avatar  avatar Rose Hirigoyen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.