Author: admin
Home > Articles posted by admin (Page 101)
Posted at 16:10h
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...
Question:
Make a class definition for a BankAccount. It should have attributes for :
– its name (a string),
– account number (a string or integer),
– and balance (a float).
It should have methods to:
– make deposits with displaying the balance,
– and make withdrawals with displaying the balance.
Hint:
...
Question:
Create a loop between 1 to 20.
Print “fizz” if the number is divisible by 3
Print “bizz” if the number is divisible by 5
Print “fizzbizz” if a number is divisible by both 3 and 5.
Otherwise, print the number itself.
...
Posted at 21:36h
in
Uncategorized
by admin
Question:
Continue to program the code we made in the class at the bottom of this page. Try to use for loop to create buttons from 1-9, so the tkinter window would display as below:
for i in range(1, 10): col = ____________ ...
Question:
Continue with the code in the previous class. Add gravity and acceleration into the code as discussed in the previous class. Also, please consider the bottom of the screen as the base. Please use the below image as reference:
...
Posted at 21:25h
in
Uncategorized
by admin
Question 1:(please use function that return a value)
Write a program to display information to a driver based on his/her speed according to the following table:
km/h over the limit
Fine
1 to 20
$100
21 to 30
$270
31 or above
$500
Sample Input 1:
Enter the speed limit: 40
Enter the recorded speed of the...
Posted at 15:18h
in
Uncategorized
by admin
Question 1:
Winnie is feeling generous today, so she decided to adopt all the children in an orphanage. There are N orphanages, numbered from 1 to N, that she can choose from. Each orphanage has M children. Each children has a cuteness value ranging from 1...
Question:
A school team is trying to assign jerseys numbered 1,2,3,…,J to student athletes. The size of each jersey is either small (S), medium (M) or large (L).
Each athlete has requested a specific jersey number and a preferred size. The athletes will not be satisfied with...
Posted at 16:41h
in
Uncategorized
by admin
Question:
Modify the program we made in the class to:
Create Missile class
Add one missile to your program
missile will automatically move from your spaceship to the top of the screen
once missile reach the top of the screen, it will re-appear from the location...
Question:You have to determine if it is possible to escape from a room. The room is an M-by-N grid with each position (cell) containing a positive integer. The rows are numbered 1, 2, . . . , M and the columns are numbered 1, 2,...