TORONTO KIDS COMPUTER CLUB | admin
1

## 02 FebTuesday Python Homework 18:30 – 23.01.31.

Question: Martha takes a jar of quarters to the casino with the intention of becoming rich. She plays three machines in turn. Unknown to her, the machines are entirely predictable. Each play costs one quarter. The first machine pays 30 quarters every 35th time it is played; the second machine...

## 02 FebTuesday 17:00 Python Practice – 23.01.31.

You could do the following homework using IDLE. Please save your IDLE after finish your homework or you could copy you result to google Docs in the google classroom. Google classroom link: https://classroom.google.com/c/NTg1ODEwNjI3Njkx?cjc=mtmyo64 Variable Questions: Question 1 Make a variable and assign a number to it (any number you like)....

## 02 FebMonday 19:00 Python Practice – 23.01.30

Question 1: Make a function that will allow you to print any name, address, street, city, state or province, zip or postal code, and country in the world. (Hint: It needs seven arguments. You can pass them as individual arguments or as a list.) Question 2: Write a function to calculate the total value of some...

## 01 FebMonday 17:30 Python Practice – 23.01.30.

Question: Make changes of the program by creating Enemy class, so we can create an enemy object in the main program, the enemy spaceship could complete the following tasks: the enemy could appear at the top of the screen and bounce back and forth when it...

## 29 JanSaturday 16:30 Python Practice – 23.01.28.

Question: How to create ending screen shows the following 3 lines of information: Game Over Your score is: ?? press space to restart and the game will be restarted if you press the space. ...

## 29 JanSaturday 13:00 Python Practice – 23.01.28.

Question: Make changes of the program we made in the class, so the enemy spaceship could complete the following tasks: more new enemies will keep entering the game at the random x position from the top of the screen. the enemy can bounce back when...

## 29 JanFriday 16:15 Python Practice – 23.01.27.

Question： Write a program that asks the user to enter his/her name, age, favorite color, and favorite food. Have the program save all four items to a text file called myinfo.txt, each one on a separate line....

## 29 JanFriday Python Practice 19:30 – 23.01.27

Question 2: Continue modify the program we made in the class, so the moon and reflection on the ocean will move towards the right side of the screen. ...

## 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',...

## 29 JanAurora Wednesday 18:30 Python Practice 23.01.25.

Question: A class has been divided into groups of three. This division into groups might violate two types of constraints: some students must work together in the same group, and some students must work in separate groups. Your job is to determine how many of the constraints...