Author: admin
Home > Articles posted by admin (Page 132)
Question 1:
Write a program that does the following:
Generates a random secret number between 1 and 100 (including 1 and 100).
Asks the user to guess the secret number, then tell them whether they guessed too low, too high, or exactly right.
Keeps the game going until...
Posted at 04:11h
in
Uncategorized
by admin
Question:
Continue with the code in the previous class. Add the below functionality
Make sure that when you click 1/x it shows the result of the output
Only digits should be shown in the Entry box no other operator or text other than digit should...
Question 1:
Your teacher likes to give multiple choice tests. One benefit of giving these tests is that they are easy to mark, given an answer key. The other benefit is that students believe they have a one-in-five chance of getting the correct answer, assuming the...
Posted at 04:07h
in
archives
by admin
Problem Description
Suppose we have a number like 12. Let’s define shifting a number to mean adding a zero at the end. For example, if we shift that number once, we get the number 120. If we shift the number again we get the number 1200....
Question:Martha takes a jar of quarters to the casino with the intention of becoming rich. She plays three machines in turn. Unknown to her, the machines are entirely predictable. Each play costs one quarter. The first machine pays 30 quarters every 35th time it is played; the second machine...
Posted at 14: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...
Question 1:Your teacher likes to give multiple choice tests. One benefit of giving these tests is that they are easy to mark, given an answer key. The other benefit is that students believe they have a one-in-five chance of getting the correct answer, assuming the...
Posted at 20:35h
in
archives
by admin
Question:
Continue to program the code so the tkinter window would display as below:
...
Posted at 02:45h
in
Uncategorized
by admin
Question:
We have made class Laser and showed you how to load different image to switch costumes.
Please made a class Planet, it will contains following methods:
__init__(self) - It initials the Planet from a random centerx position, and top = -1000
Since planets has 3 possible images(you could...
Question 1:
Use while loop to create the multiplication table program. After asking which table the user wants, ask her how high the table should go. The output should look like this:
Sample Input:
Which multiplication table would you like? 7
How high do you want to go? 12
Sample Output:
Here’s your...