27 Mar Aurora Wednesday 18:30 Python Practice 21.03.24.
Question: Continue modify the program in the class, so the barbarian can move diagonally (means it can move not only x position also y position.) ...
Question: Continue modify the program in the class, so the barbarian can move diagonally (means it can move not only x position also y position.) ...
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:Create Card class so it can complete the following tasks: Card() – You can initial the card with random value (Assume the smallest card value is ‘2’, then followed by ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’, ’10’, ‘J’, ‘Q’, ‘K’, ‘A’) and according rank (integer...
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...
Use Stack to solve the following question: You are given an array A of Q integers and Q queries. In each query, you are given an integer i (1≤i≤N). Your task is to find the minimum index greater than i (1≤i≤N) such that: Sum of digits of Ai is greater than the sum of digits of Aj Ai < Aj If there is no answer, then print -1. Input...
Question: Continue modify the program in the last class, if your fighter touches the enemy: the fighter will explode the game status will be STATUS_GAMEOVER when game over, everything will not show on the screen except for the background and planets. ...
Question for Linear Search: Creatnx now wants to decorate his house by flower pots. He plans to buy exactly N ones. He can only buy them from Triracle’s shop. There are only two kind of flower pots available in that shop. The shop is very strange. If you...
Question for Linear Search:Creatnx now wants to decorate his house by flower pots. He plans to buy exactly N ones. He can only buy them from Triracle's shop. There are only two kind of flower pots available in that shop. The shop is very strange. If you...
Question:A series of streams run down the side of a mountain. The mountainside is very rocky so the streams split and rejoin many times. At the foot of the mountain, several streams emerge as rivers. Your job is to compute how much water flows in...
Notes: It is optional to do the homework form 6 - 8 if you are blow grade 5 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...