Uncategorized
Home > Uncategorized (Page 51)
Posted at 02:01h
in
Uncategorized
by admin
Question 1:
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...
Posted at 00:25h
in
Uncategorized
by admin
Question:
Continuing with the code in the previous class we added the bullets to the game but the bullets are not moving towards the top.
Modify the update function inside the Missile class so that the missile moves towards the top when we hit the space key
The...
Posted at 01:30h
in
Uncategorized
by admin
Question 1:
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.
Question 2:
Continue modify...
Posted at 14:35h
in
Uncategorized
by admin
Question 1:
Please using easygui to create the program we made in the class. The enter box will ask you password, if you get the right password, the msgbox will display ‘FBI Access granted’
Question 2:
Create a simple number guessing game. The computer will ask the first...
Posted at 14:29h
in
Uncategorized
by admin
Question 1:
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...
Posted at 02:47h
in
Uncategorized
by admin
Question:
Modify the program we made in the class to:
Create Enemy class
Add one enemy spaceship to your program
The enemy spaceship will keep moving from left to right and right to left side of the screen.
...
Posted at 02:45h
in
Uncategorized
by admin
Question 1:
Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this:
You probably used a for loop in your program in last homework. That’s how most people would do...
Posted at 02:43h
in
Uncategorized
by admin
Question 1:
Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this:
You probably used a for loop in your program in last homework. That’s how most people would do...
Posted at 02:41h
in
Uncategorized
by admin
Problem DescriptionSuppose 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....
Posted at 02:39h
in
Uncategorized
by admin
Question:
Create Card class so it can complete the following tasks:
You can initial the card with value.
you can compare two card object like c1>c2.
you can use print(c1) shows the card value
(Assume the smallest card value is 2, then followed by 3, 4, 5,...