TORONTO KIDS COMPUTER CLUB | admin
1

## 19 NovSaturday 14:00 Python Homework 11.17.

Question 1. Write a short program to generate a list of five random integer numbers from 1 to 20, and print them out. Question 2. Write a short program that prints out a random decimal number every 3 seconds for 30 seconds. Hint: You need import module time. time.sleep(5) means wait 5 seconds Bonus...

## 19 NovSaturday 12:00 Python Homework 11.17.

Import practice: Question 1. Write a short program to generate a list of five random integer numbers from 1 to 20, and print them out. Question 2. Write a short program that prints out a random decimal number every 3 seconds for 30 seconds. Hint: You need import module time. time.sleep(5) means wait 5...

## 17 Novpython

fourletters volume = int(input()) if volume >= 120: carClass = "Large" elif volume < 120: carClass = "Mid-Size" elif volume < 110: carClass = "Compact" elif volume < 100: carClass = "Subcompact" else carClass = "Minicompact" print(carClass) checktriangle toplevel import easygui choice = easygui.buttonbox("which hero do you like the most?", choices=['archer','pekka','witch']) if choice == 'archer': easygui.msgbox(image = 'archer.gif') if choice...

## 13 NovSunday 9:45 Python Homework 11.11.

Question 1： Write a program that does the following: Generates a random secret number between 1 and 100 (including 1 and 100). Asks the user to guess the secret number, then tell them whether they guessed too low, too high, or exactly right. Keeps the game going until...

## 12 NovSunday 12:00 Python Homework 11.11.

Question： Create an OunceConversion object to convert any number of fluid ounces to the equivalent number of gallons, quarts, pints, and gills. (There are 128 fluid ounces in a gallon. There are 32 fluid ounces in a quart. There are 16 fluid ounces in a pint. There are 4 fluid...

## 12 NovMonday Online Python Homework 01.28.

Question 1: Create a Tank object which have the attributes of: name direction(up/down/left/right) x position and y position The Tank object also have a method: move (direction, steps) Using __init__ to Initial the tank to make sure it start from x position of 0 and y position of 0 Print...

## 12 NovSaturday 12:00 Python Homework 11.10.

Question： Create an OunceConversion object to convert any number of fluid ounces to the equivalent number of gallons, quarts, pints, and gills. (There are 128 fluid ounces in a gallon. There are 32 fluid ounces in a quart. There are 16 fluid ounces in a pint. There are 4 fluid...

## 12 NovSaturday 9:30 Python Homework 11.10.

Question ： Create a list called “attributes” , it contains “HP”, “Attack”, “Defense”, “Special Attack”, “Special Defense”, “Speed” Modify the list in the question one, replace “Special Attack” and “Special Defense” with “Magic” and “Stamina” Add “Special skills” in the end of the list Delete “Speed” from...

## 12 NovFriday Evening Python Homework 11.09.

Import practice: Question 1. Write a short program to generate a list of five random integer numbers from 1 to 20, and print them out. Question 2. Write a short program that prints out a random decimal number every 3 seconds for 30 seconds Bonus Question (Difficulty: Hard): Write a function to print your name...

## 12 NovMonday Online Python Homework 11.12.

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 or down? Question 3. Try using int() to create...