12 Jun Monday 17:00 Python Practice – 22.06.06.
Question 1: Draw the following picture in the pygame window: (could be different color) Hint: using pygame.draw.circle Question 2: Draw below image using pygame. (could using different color) ...
Question 1: Draw the following picture in the pygame window: (could be different color) Hint: using pygame.draw.circle Question 2: Draw below image using pygame. (could using different color) ...
Question: Ken is working for the secret agency. He is going to send a secret message that encodes UPPERCASE words by shifting their letters forward. Shifting a letter by S positions means to go forward S letters in the alphabet. For example, shifting B by S = 3 positions gives E. However, sometimes...
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 create...
Question: When Jack's friends visit him on the farm, he likes to show them around. His farm comprises N (1 <= N <= 1000) fields numbered 1..N, the first of which contains his house and the Nth of which contains the big barn. A total M...
Question 1: A store is having a sale. They’re giving 10 percent off purchases of $10 or lower, and 20 percent off purchases of greater than $10. Write a program that asks the purchase price and displays the discount (10% or 20%) and the final price. Sample Input...
Question: Write a function to print your name in big letters, make sure you enter the name in lower case, like this: Hint: a = [ "###", "# #", "###", "# #", "# #"] b = [ "###", "# #", "###", "# #", "###"] c = [ "###", "# ",...
Question 2: A simple poem consists of one or more four-line verses. Each line consists of one or more words consisting of upper or lower case letters, or a combination of both upper and lower case letters. Adjacent words on a line are separated by a...
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 common problem in mathematics is to determine which quadrant a given point lies in. There are four quadrants, numbered from 1 to 4, as shown in the diagram below: For example, the point A, which is at coordinates (12, 5) lies in quadrant 1 since...
Question 1: Draw the following picture in the pygame window: (could be different color) Hint: using pygame.draw.circle Question 2: Draw below image using pygame. (could using different color) Hint: using pygame.draw.rect ...