02 Nov Friday 17:00 Python Practice 20.10.30
Question: Continue modify the program we made in the class: The fighter will explode if the enemy or the bullet touches the fighter. ...
Question: Continue modify the program we made in the class: The fighter will explode if the enemy or the bullet touches the fighter. ...
Question 1: Most likely, you will notice that you have a mouse attached to your computer, which lets you move the cursor around the screen. Your job is to get between the mouse and the cursor. Suppose that the bottom left-hand corner of your screen is (0,0),...
Question 1: Write a program using while loop. The program will ask the user to enter an ingredient for pizza. Every time you enter an ingredient, the program will show the message “We will add …. into your pizza.”, until you enter “quit”. Sample: Please enter an ingredient...
Question: Write a program to ask the user for five names. The program should store the names in a list, and print them all out at the end. It should look something like this: Sample input: Enter 5 names: Tony Paul Nick Michel Kevin Sample output: The names are Tony, Paul, Nick, Michel, Kevin Hint: You can...
Continue with the code in the previous class, add a button with the sign % which will find the remainder of two numbers....
Question: The Logging Company cuts a lot of trees. For management reasons, they want to produce a table of the total amount of wood cut every day. They have hired you, to help them produce the table. They’ve kept a log of trees logged, and they...
1. What is the output of print mystr * 2 if mystr = 'Hello World!'? A. Hello World * 2 B. Hello World! Hello World! C. Hello Hello D. mystr mystr 2. How would you cast the string variable “a” that is equal to “2” into the integer 2? A. castToInt(a) B. int(a) C....
Question: write a program to ask user about the date(year, month and day), then calculate the day of the year. Sample input: Year: 2016 Month: 6 Day: 23 Sample output: Day of the year: 175 Hint: You need consider leap years and non leap years, in order to do easier calculation, you may...
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: Sample Input: Which multiplication table would you like? 5 Sample Output: Here’s your table: 5 x 1 = 5 5 x 2...
Question:Create a Time class and initialize it with hours and minutes. Make a method addTime which should take two time object and add them. E.g.- (2 hour and 50 min)+(1 hr and 20 min) is (4 hr and 10 min) Make a method displayTime which should print...