Section 3. Chapitre 3
single
float and int
Glissez pour afficher le menu
Let's continue the last task.
Tâche
Glissez pour commencer à coder
Consider the variables from the previous chapter, and new variable velocity (in miles per hour). Your tasks are:
- Find out number of hours that needed to pass the distance (
dist_mi) with constant speed (velocity). Save this result withintime_hvariable, and output the result. - Calculate how many full days this trip will take using
time_hvariable. Save this number withintime_daysvariable, and output the result. Note, that there you need to round up this number. You can do it by converting to integer, and adding 1 day.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 3. Chapitre 3
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion