Question: Continue coding the program we did in the class, so the program will tell you whether you can pay in the zone: height color zone if<90 red 1 elif<105 blue 1, 2 elif <120 green 1,2,3 elif <135 yellow 1,2,3,4,5 elif <150 purple 4,5 else white 6 Please continue coding the following program: print('Welcome to the adventureland!') h = int(input('Height:')) if h < 90: c = 'red' elif h <...
Hint: this question is to first enumerate the range of an edge (abscissa), and then enumerate the sorted points, according to the current enumerated points The ordinate of the point with the largest ordinate before gets the length of this side, and then compare and...
Question: Rory is playing with an array A consisting of N integer elements indexed from 1 to N and a positive integer M. Rory will perform Q operations. Each operation is either type 1 or type 2. Type 1 operation is in the form 1 l r x. You should add x to each element in A[l], A[l + 1],...
Question: Use for loop to print the following patterns: a. * ** *** **** b. * *** ***** *** * c. 1010101 10101 101 1 ...
Question: Modify the program we made in the class. Create a Boss Class the __init__() method will take three parameters (imgFile, location and speed) the update() method will move the object, if the top of the object reaches the bottom of the screen, it will disappear...
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: Input a string. You must using a stack, reverse the string and print it. Sample Input 1: Enter String to reverse : Apple Sample Output 1 elppA Sample Input 2 Orange Sample Output 2 eganrO...
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...