TORONTO KIDS COMPUTER CLUB | Monday 19:00 Python Practice – 22.09.26.
21178
post-template-default,single,single-post,postid-21178,single-format-standard,ajax_fade,page_not_loaded,,no_animation_on_touch,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

# Monday 19:00 Python Practice – 22.09.26.

## 01 Oct Monday 19:00 Python Practice – 22.09.26.

Question 1:
You are in a bike race which goes up and down a hill. You could create two variables: uphillDistance and downhillDistance give the distance (in km) of both parts of the race. Write a program that will print out the total distance for the entire race.

Sample Input:
Uphill distance: 3
Downhill Distance: 5

Sample Output:
The total distance is 8 km

Question 2:

Write a program that helps the user add up her change. The program should ask:

• “How many quarters?”
• “How many dimes?”
•  “How many nickels?”

Then it should give the total value of the change

```Sample Input:
How many quarters? 1
How many dimes? 2
How many nickels? 4

Sample Output:
The total is \$0.65```
##### No Comments

Sorry, the comment form is closed at this time.