TORONTO KIDS COMPUTER CLUB | Sunday 09:45 Homework
105

# Sunday 09:45 Homework

## 29 JanSunday 9:45 Python Homework 01.27.

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

## 22 JanSunday 9:45 Python Homework 01.20.

Question： Make a class definition for a  BankAccount. It should have attributes for : - its name (a string), - account number (a string or integer), - and balance (a float). It should have methods to: - make deposits with displaying the balance, - and make withdrawals with displaying the balance. Hint: ...

## 11 DecSunday 9:45 Python Homework 12.09.

Question： The Body Mass Index (BMI) is one of the calculations used by doctors to assess an adult’s health. The doctor measures the patient’s height (in meters) and weight (in kilograms), then calculates the BMI using the formula BMI = weight / (height * height) Write a program which...

## 05 DecSunday 9:45 Python Homework 12.02.

Question 1：(please use function that return a value) Write a program to display information to a driver based on his/her speed according to the following table: km/h over the limit Fine 1 to 20 \$100 21 to 30 \$270 31 or above \$500 Sample Input 1: Enter the speed limit: 40 Enter the recorded speed of the...

## 28 NovSunday 9:45 Python Homework 11.25.

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

## 20 NovSunday 9:45 Python Homework 11.18.

Question： 1.Try to modify the program we made in the class(please see the code below), make one more choice to show your game status, it includes the name of all heroes which you own with its level and the money you have, the display result could be...

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

## 06 NovSunday 9:45 Python Homework 11.04.

Question 1: Use range(1, 201), make two list, one containing all even numbers and other containing all odd numbers. Question 2: From the two lists you got in the question #1, make new lists, containing only numbers which are divisible by 4, 10, 3, 7 and 9 in separate lists. ...

## 30 OctSunday 9:45 Python Homework 10.28.

Question 1： Write a program to ask the user for five names. The program should store the names in a list, and print them all out at the end. It should look something like this: Sample input： Enter 5 names: Tony Paul Nick Michel Kevin Sample output： The names are Tony, Paul, Nick, Michel, Kevin Hint: You...

## 24 OctSunday 9:45 Python Homework 10.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...