Posted at 02:55h
in
Uncategorized
by admin
Question:
Continue modify the program we made in the class, so that:
if there’s head shot and you hit the target, please display the head shot message
if you chose the gun, the enemy’s hp will decrease and message box will tell how much damage caused...
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:
Today is Jack's birthday. He invites a lot of friends. Now it's dinner time. Jack wants to know how many tables he needs at least. You have to notice that not all the friends know each other, and all the friends do not want to...
Posted at 20:02h
in
Uncategorized
by admin
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 the new value using print.
Question 3
Make...
Question 1:
Use recursion to write a function divides_all that consumes a list of positive integers seq and a positive integer factor. Your function should produce True if every item in seq is a multiple of factor and False otherwise. The helper function is_multiple has been provided for you.
Question 2:
Use recursion to write a function reverse that consumes a list seq and produces a new...
Question:
Create a Python class Person with attributes: name and age of type string.
Create a display() method that displays the name and age of an object created via the Person class.
Create a child class Student which inherits from the Person class and which also has a section attribute.
Create a method displayStudent() that...