TORONTO KIDS COMPUTER CLUB | Monday Online Python Homework 11.12.
15930
post-template-default,single,single-post,postid-15930,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 Online Python Homework 11.12.

12 Nov Monday Online Python Homework 11.12.

Question 1.

Use float() to create a number from a string like ‘12.34’. Make sure the result is really a number!


Question 2.

Try using int() to create an integer from a decimal number like 56.78. Did the answer get rounded up or down?


Question 3.

Try using int() to create an integer from a string. Make sure the result is really an integer!


Question 4.

Write a program that asks for your first name, then asks for your last name, and then prints a message with your first and last names in it.


Question 5.

Write a program that asks for the dimensions (in feet) of a rectangular room, and then calculates and displays the total amount of carpet needed to cover the room.


Question 6.

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

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

Then it should give the total value of the change

 

No Comments

Sorry, the comment form is closed at this time.