Professional Documents
Culture Documents
Exercice - Travailler Avec Une Sortie - Training - Microsoft Learn
Exercice - Travailler Avec Une Sortie - Training - Microsoft Learn
" 100 XP
Vous avez utilisé 2 bacs à sable sur la limite de 10 disponible aujourd’hui. D’autres bacs à sable seront
disponibles demain.
This exercise is broken into a series of steps. For each step you will be presented with the goal for the step,
follo ed b an empt cell Enter o r P thon into the cell and r n it The sol tion for each step ill follo each
print(date.today())
https://learn.microsoft.com/fr-fr/training/modules/python-create-run-program/3-exercise-print 1/2
1/24/24, 4:36 PM Exercice : travailler avec une sortie - Training | Microsoft Learn
Create a variable named parsecs and set it to 11 . Then add the code to perform the appropriate calculation
and store the result in a variable named lightyears . Finally print the result on the screen with so it displays a
message which resembles the following:
“
YourRemember
code should resemble
to you thestr
can use following:
to convert numbers to strings
parsecs = 11
lightyears = parsecs * 3.26
print(str(parsecs) + " parsecs is " + str(lightyears) + " lightyears")
Desired output
When you run the notebook you should see the following result:
Continuer T
https://learn.microsoft.com/fr-fr/training/modules/python-create-run-program/3-exercise-print 2/2