Posted at 04:13h
in
Uncategorized
by admin
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...
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...