Seksjon 3. Kapittel 3
single
float and int
Sveip for å vise menyen
Let's continue the last task.
Oppgave
Swipe to start coding
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.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 3
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår