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

Monday 17:00 Python Practice – 21.11.15.

21 Nov Monday 17:00 Python Practice – 21.11.15.

You should create a python file and write program for this week’s homework, detailed instructions as below:

  • Open Python IDLE
  • In Menu Bar, Click “File” => “New File(important!!!)
  • Write your program in the new file
  • After finishing writing the program, click “Run”=>”Run Module” in menu bar or just press “F5”
  • Python will ask you save the file before run the program
  • Check your code and fix the errors.

Question:

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.