TORONTO KIDS COMPUTER CLUB | admin
1

## 14 MayAurora Monday 18:30 Python Homework 20.05.11.

Question: Eric works in a door mat manufacturing company. One day, he designed a new door mat with the following specifications: ◦ Mat size must be A x B. (A is an odd natural number, and B is 3 times A.) ◦ The design should have ‘WELCOME’ written in...

## 14 MayAurora Wednesday Saturday Python Homework 20.05.13.

Question: Create a Word class from a string. You need one argument (which is the original string) to create the object. def __init__(self, original): You need one method to reverse the string def reverse(self): You can print the object with the following expected output if the...

## 14 MayMarkham Friday 19:30 Python Homework 20.05.08.

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

## 12 MayAurora Saturday 16:30 Python Homework 20.05.09.

Question： 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 can use...

## 12 MayAurora Saturday 14:30 Python Homework 20.05.09.

Problem DescriptionAnna and Jack are playing a game. Each player starts with 100 points. The game uses standard six-sided dice and is played in rounds. During one round, each player rolls one die. The player with the lower roll loses the number of points shown on the...

## 12 MayMarkham Saturday 9:30 Python Homework 20.05.09.

Question: Write a function luckySum(a, b, c) to calculate sum of given 3 int values, a b c. The function will have a return value of their sum. However, if one of the values is 13 then it does not count towards the sum and values to its...

## 12 MayPMCA Friday 19:00 Python Homework 20.05.08.

Question: You take part in a competition and get good score. So you decide to add it to your resume. However, the released results only include the average rank for each of the attained scores. You think that might not be enough information, and want to...

## 12 MayAurora Thursday Saturday Python Homework 20.05.09.

Question 1: 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. Question 2: Please finish...

## 12 MayAurora Wednesday Saturday Python Homework 20.05.09.

Question： Create a Tank class which have the attributes of: name direction(use ‘up’, ‘down’, ‘left’ or ‘right’) x position and y position The class also have the following method: move (self, direction, steps) Using __init__() to Initial the tank to make sure it start from x position of 0,...

## 08 MayPMCA Sunday 12:00 Java Homework 20.05.03.

Continue with the code in the previous class. Write a method to find the depth of the given tree, for example: The depth of the above tree is 4 as the last leaf node with value 16 is at level 4 of the tree. Please find the ...