Début du premier TP
This commit is contained in:
parent
1a002a780c
commit
b47afcc893
4 changed files with 142 additions and 0 deletions
39
src/cours/CIEL1/01-bases-python/tp/_01_decouverte.md
Normal file
39
src/cours/CIEL1/01-bases-python/tp/_01_decouverte.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
```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))
|
||||
)
|
||||
~~~
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue