TORONTO KIDS COMPUTER CLUB | Friday 19:30 Homework
158

# Friday 19:30 Homework

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

## 24 JanFriday Python Practice 19:30 – 23.01.20

Question 1: Draw the following picture in the pygame window: (could be different color) Hint: using pygame.draw.circle Question 2: Draw below image using pygame. (could using different color) ...

## 18 JanFriday Python Practice 19:30 – 23.01.13

Question 1: Create a Python class Person with attributes: name and age of type string. Create a display() method that displays the name and age of an object created via the Person class. Create a child class Student which inherits from the Person class and which also has a section attribute. Create a method displayStudent()...

## 10 JanFriday Python Practice 19:30 – 23.01.06

Question 1: Create a Student class and make the following methods to : __init__() – Initialize it with name and roll number. __str__() – Display all information of the student. setAge() – It should assign age to student. setMarks() – It should assign marks to the...

## 07 DecFriday Python Practice 20:30 – 22.12.02

Question: A common problem in mathematics is to determine which quadrant a given point lies in. There are four quadrants, numbered from 1 to 4, as shown in the diagram below: For example, the point A, which is at coordinates (12, 5) lies in quadrant 1 since...

## 30 NovFriday Python Practice 20:30 – 22.11.25

Question: You are given a string . Suppose a character ‘a’ occurs consecutively n times in the string. Replace these consecutive occurrences of the character ‘a’ with (n, ‘a’) in the string. Input Format:  A single line of input consisting of the string . Output Format: A single line of...

## 23 NovFriday Python Practice 20:30 – 22.11.18

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

## 16 NovFriday Python Practice 20:30 – 22.11.11

Question: Given the list of student marks: marks = [62, 84, 74, 51, 98, 73, 77, 90, 85, 79, 65, 58, 74, 86] Write a function that takes in a list of arguments and then returns a list containing marks which are above average. Name the function whatever you like...

## 31 OctFriday Python Practice 20:30 – 22.10.28

Question: The factorial function (symbol: !) says to multiply all whole numbers from our chosen number down to 1. Examples: 4! = 4 × 3 × 2 × 1 = 24 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040 1! = 1 Factorial is not defined for...

## 24 OctFriday Python Practice 20:30 – 22.10.21

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