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

Uncategorized

24 Jun PMCA Sunday 10:00 Practice -08.

Question 1: Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this: You probably used a for loop in your program in last homework. That’s how most people would do...

Read More

24 Jun Thursday Online Python Homework 06.20

Question 1 We are going to continue to work on the 'hero.db' database. Since we have already created a table called "heroes" in the database, we are going to add 2 more records in the table "heroes": Field name hero_level int_growth agi_growth str_growth hero_int hero_agi hero_str New record 1 Hercules 1 3.6 6 9.9 270 150 140 New record 2 Blade 1 10 18.5 14.5 40 28 39 Question 2: From all the records in...

Read More

18 Jun PMCA Sunday 10:00 Practice -07.

Question: Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this: Sample Input: Which multiplication table would you like? 5 Sample Output: Here’s your table: 5 x 1 = 5 5 x 2 =...

Read More

12 Jun Sunday 16:00 Python Homework 06.09

Question 1: A store is having a sale. They’re giving 10 percent off purchases of $10 or lower, and 20 percent off purchases of greater than $10. Write a program that asks the purchase price and displays the discount (10% or 20%) Sample Input: Your Purchases: 14 Sample Output: Congratulations! You got 20...

Read More

10 Jun PMCA Sunday 10:00 Practice -06.

Question: A soccer team is looking for girls from ages 10 to 12 to play on their team. Write a program to ask the user’s age and if male or female (using “m” or “f”). Display a message indicating whether the person is eligible to play on the team. Sample input 1: Gender:...

Read More

10 Jun Monday Online Python Homework 06.06

Question You supervise a small parking lot which has N parking spaces. Yesterday, you recorded which parking spaces were occupied by cars and which were empty. Today, you recorded the same information. How many of the parking spaces were occupied both yesterday and today? Input Specification: The first line of input...

Read More

05 Jun PMCA Sunday 10:00 Practice -05.

Question: A store is having a sale. They’re giving $10 off when you purchase more than $100. Write a program that asks the purchase price and displays the final price. Sample Input 1: Your purchase: 90 Sample Output 1: You final price is $90 Sample Input 2: Your purchase: 120 Sample Output 2: your...

Read More

05 Jun Friday 19:00 Philip Python Homework 05.31.

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" >>> vegetables = vegetables.split(", ") >>> vegetables ['carrots', 'potatoes', 'onions', 'leeks', 'celery'] >>> fruits = ['avocados', 'bananas', 'oranges', 'grapes', 'mangoes'] >>>",...

Read More