TORONTO KIDS COMPUTER CLUB | Uncategorized
1
archive,paged,category,category-uncategorized,category-1,paged-46,category-paged-46,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Uncategorized

23 Sep Friday 17:00 Python Practice 20.09.18.

Question 1:(if you did not do this question last week) 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) Code to draw a rectangle is pygame.draw.rect(screen,[red,blue,green],[x,y,width,height,0]...

Read More

16 Sep Aurora Tuesday 18:30 Python Practice – 06 20.09.15.

Question 1: Continue coding the program we did in the class, so the program will tell you whether you can pay in the zone: height color zone if<90 red 1 elif<105 blue 1, 2 elif <120 green 1,2,3 elif <135 yellow 1,2,3,4,5 elif <150 purple 4,5 else white 6 Please continue coding the following program: h = int(input('Height:')) if h < 90:    c = 'red' elif h < 105:   ...

Read More

16 Sep Monday 20:00 Python Practice 20.09.14.

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

Read More

11 Sep PMCA Sunday 14:00 Python Homework 20.09.06.

Question 1: Input a string and print the string 5 times Sample program run ---------------------------- Enter a string: Apple AppleAppleAppleAppleApple Sample program run ---------------------------- Enter a string: Orange OrangeOrangeOrangeOrangeOrange Question 2: Write a program to find the simple interest for an amount (P) for the rate (R ) and for the number of years (Y). The formula...

Read More

09 Sep Aurora Saturday 13:00 Python Practice 09.05.

Question 1: 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',...

Read More