TORONTO KIDS COMPUTER CLUB | Aurora Thursday Saturday Python
132

Aurora Thursday Saturday Python

04 AugAurora Saturday 13:00 Python Practice 20.08.01.

Question 1: Factorial of any number n is represented by n! and is equal to 1*2*3*….*(n-1)*n. for example: 4! = 1*2*3*4 = 24 3! = 3*2*1 = 6 2! = 2*1 = 2 Also, 1! = 1 0! = 1 Write a program to calculate factorial of a given number. Question 2: Create a loop...

29 JulAurora Saturday 13:00 Python Practice 20.07.25.

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: You probably used a for loop in your program in last homework. That’s how most people would do...

21 JulAurora Saturday 13:00 Python Practice 20.07.18.

Question : 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...

16 JulAurora Saturday 13:00 Python Practice 20.07.11.

Question: A soccer team is looking for girls from ages 10 to 12 to play on their team. Write a program to ask the user’s age and if male or female (using “m” or “f”). Display a message indicating whether the person is eligible to play on the team....

08 JulAurora Saturday 13:00 Python Practice 20.07.04.

Question: A store is having a sale. If the customer purchased 10 dollars or more, the store will give \$2 off. Please write a program to ask how much the customer has bought. The program will show the discount and the final price the customer has...

02 JulAurora Saturday 13:00 Python Practice 20.06.27.

Question 1. Use EasyGui to write a program to convert temperatures from Fahrenheit to Celsius. The formula for that is: Celsius = 5 / 9 * (Fahrenheit – 32). Use GUI input and output. You need to create a easygui enterbox to ask Fahrenheit, then use...

24 JunAurora Saturday 13:00 Python Practice 20.06.20.

Question: Write a program that asks for your name, then street, then city, then province, then postal code (all in EasyGui message boxes). The program should then display a mailing-style full address that looks something like this: Hint: '\n' can help you create a new line for example: >>>...

17 JunAurora Saturday 13:00 Python Practice 20.06.13.

You can do Question 1~ 3 in Python IDLE: Question 1. Use float() to create a number from a string like ‘12.34’. Make sure the result is really a number! Question 2. Try using int() to create an integer from a decimal number like 56.78. Did the answer get rounded up...

22 MayAurora Thursday Saturday Python Homework 20.05.21.

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...

18 MayAurora Thursday Saturday Python Homework 20.05.16.

Question 1： Using split and join function of the list to change string "green,red,yellow,blue," into string: "green light* red light* yellow light* blue light* " Hint: >>> vegetables = "carrots, potatoes, onions, leeks, celery" >>> # string.split(separator) will split the string by separator, for example: >>> vegetables = vegetables.split(", ") >>> print(vegetables) ['carrots', 'potatoes', 'onions',...