Uncategorized
Home > Uncategorized (Page 53)
Posted at 22:56h
in
Uncategorized
by admin
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...
Posted at 03:04h
in
Uncategorized
by admin
Question 1
Make a variable and assign a number to it (any number you like). Then display your variable using print.
Question 2
Modify your variable, either by replacing the old value with a new value, or by adding something to the old value. Display the new value using print.
Question 3
Make another...
Posted at 14:42h
in
Uncategorized
by admin
Question:
A store is having a sale. They’re giving 10 percent off purchases of $10 or lower, and 20 percent off purchases of greater than $10. Write a program that asks the purchase price and displays the discount (10% or 20%) and the final price.
Sample Input 1:
How...
Posted at 14:35h
in
Uncategorized
by admin
Question 1.
Use EasyGui buttonbox to write a program to ask your favorite ice cream flavor, the easygui window will give you three choices. Using msgbox to display your selection as following:
...
Posted at 14:19h
in
Uncategorized
by admin
Draw the following picture in the pygame window: (could be different color)
Hint: using pygame.draw.circle...
Posted at 14:46h
in
Uncategorized
by admin
Question:
Continue to program the code we made in the class. Try to make back (<-) button work as following:
if there are more than 1 digits in the display, you can delete the digit form right side
if there is only 1 digits in the...
Posted at 04:48h
in
Uncategorized
by admin
Question:
A soccer team is looking for girls from ages 10 to 12 to play on their team. Write a program to ask the user’s age and if male or female (using “m” or “f”). Display a message indicating whether the person is eligible to play on the team....
Posted at 04:47h
in
Uncategorized
by admin
Question
You supervise a small parking lot which has N parking spaces. Yesterday, you recorded which parking spaces were occupied by cars and which were empty. Today, you recorded the same information. How many of the parking spaces were occupied both yesterday and today?
Input Specification:The first line of input contains the...
Posted at 04:36h
in
Uncategorized
by admin
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...
Posted at 20:47h
in
Uncategorized
by admin
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.
Hint:
You should create 3 variables to assign to the number of quarters, dimes and...