TORONTO KIDS COMPUTER CLUB | Tuesday 17:30 Python Homework 21.02.16.
19081
post-template-default,single,single-post,postid-19081,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Tuesday 17:30 Python Homework 21.02.16.

21 Feb Tuesday 17:30 Python Homework 21.02.16.

Question 1.

Use EasyGui to write a program to convert temperatures from Fahrenheit to Celsius. The formula for that is: Celsius = 5 / 9 * (Fahrenheit – 32). Use GUI input and output. You need to create a easygui enterbox to ask Fahrenheit, then use message box to show the Celsius degree. (Hint: the input you get from the enter box is a string, so you need float() to convert it into decimal number.


Question 2:
We have learned how to use if statement to making the choices. Please using easygui to create the program we made in the class. The enter box will ask you password, if you get the right password, the msgbox will display ‘FBI Access granted’


Question 3:
A store is having a sale. They’re giving $10 off when you purchase more than $100. Write a program that asks the purchase price and displays the final price.

Sample Input 1:
Your purchase: 90

Sample Output 1:
You final price is $90

Sample Input 2:
Your purchase: 120

Sample Output 2:
your final price is $110

Hint:
You need to use float(input(...)) to get how much you purchased
You need to use if statement to calculate the final price if your purchases is more than 100


Class review and Hint:

No Comments

Sorry, the comment form is closed at this time.