ciel-b1/src/cours/CIEL1/01-bases-python/tp/_01_decouverte.md

40 lines
464 B
Markdown
Raw Normal View History

2025-07-18 20:35:16 +02:00
```admonish success title="Opérateurs"
1. 5
2.
~~~python
4+7
3-12
6*7
9/2
4.2+1.5
13%7
2**10
37*(13+24) #1369
~~~
```
```admonish success title="Module math"
1.
~~~python
math.sqrt(81)
abs(-2)
math.pi
math.cos(math.pi)
math.floor(3.56)
~~~
2.
- math.ceil() est arrondi à l'entier supérieur
- math.floor() prend la partie entière
3.
~~~python
2*math.pi*math.sqrt(
((6.378*10**6)+100000)**3
/
((6.67*10**-11)*(5.98*10**24))
)
~~~
```