TORONTO KIDS COMPUTER CLUB | Thursday Python 17:00
159

Thursday Python 17:00

29 JanThursday 17:00 Python Practice – 23.01.26.

Question： 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',...

24 JanThursday 17:00 Python Practice – 23.01.19.

Question: We have a list of following: zoo = ['monkeys', 'tigers', 'pandas', 'penguins', 'giraffes', 'hippos', 'bears'] how to retrieve a slice of list zoo, so you can get the following results? ['tigers', 'pandas', 'penguins', 'giraffes'] ['hippos', 'bears']...

15 JanThursday 17:00 Python Practice – 23.01.12.

Question: Continue modify the program we made in the class, so that: if there’s head shot and you hit the target, increase the damage by 3 times and display the head shot message the enemy’s hp will decrease and message box will tell how much damage...

10 JanThursday 17:00 Python Practice – 23.01.05.

Question: 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. Hint: You should use...

02 JanThursday 17:00 Python Practice – 22.12.29.

Question 1: Use while loop (NOT for loop) to create the multiplication table program. After asking which table the user wants, ask her how high the table should go. The output should look like this: Sample Input: Which multiplication table would you like? 7 How high do you want to go? 12 Sample Output: Here’s your table: 7...

14 DecThursday 17:00 Python Practice – 22.12.08.

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

04 DecThursday 17:00 Python Practice – 22.12.01.

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

29 NovThursday 17:00 Python Practice – 22.11.24.

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. Sample Input 1: Age:...

22 NovThursday 17:00 Python Practice – 22.11.17.

Question 1: Please using easygui to create the program we made in the class. The enter box will ask you password, if you get the right password, the msgbox will display the following image (You need download the following images and save into the same folder...

14 NovThursday 17:00 Python Practice – 22.11.10.

Question 1: Write a program to use easygui enterbox 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: Do not forget to import easygui in order to...