Question:
The factorial function (symbol: !) says to multiply all whole numbers from our chosen number down to 1.
Examples:
4! = 4 × 3 × 2 × 1 = 24
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040
1! = 1
Factorial is not defined for...
Question:
A missile interception system has been developed by a country to defend against enemy missile attacks. But there is a flaw in the missile interception system: Although its first artillery shells can reach any height, each shot cannot exceed the height of the previous pitch....
Question:
Continue modify the war-robot program we made in the class, so that:
it will be the enemy’s turn to strike you back. Enemy can only use gun to fire and cause damage between 50-90.
after enemy’s turn, if your hp is lower or equal to...
You could do the following homework using IDLE
Question 1
Make a variable and assign a number to it (any number you like). Then display your variable using print.
Question 2
Modify your variable, either by replacing the old value with a new value, or by adding something to the old value. Display...
Question:
Continue modify the war-robot program we made in the class, so that:
if enemy’s hp is lower or equal to 0, use msgbox to display message ‘you win’, and the while program finish.
it will be the enemy’s turn to strike you back. Enemy can...
Question 1:
Add something else to 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 table:
7...