Author: admin
Home > Articles posted by admin (Page 115)
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,...
Posted at 15:13h
in
Uncategorized
by admin
Question:
Problem DescriptionA fish-finder is a device used by anglers to find fish in a lake. If the fish-finder finds a fish, it will sound an alarm. It uses depth readings to determine whether to sound an alarm. For our purposes, the fish-finder will decide that...
Posted at 20:41h
in
Uncategorized
by admin
Question:
Create a wordReverse to reverse a string.
You need one argument (which is the original string) for the function
def wordReverse(word)
You must return the reversed string from the function.
For e.g The reverse of string “1234abcd” is “dcba4321”
Hint 1:
using len() to find out the length...
Continue with the code in the previous class and change the code such that the circle moves in both x direction and y direction.
The link to the code is below:
https://paste.ubuntu.com/p/pMWGFFzVnS/...