TORONTO KIDS COMPUTER CLUB | Friday 1700
151
archive,category,category-friday-1700,category-151,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Friday 1700

09 Jun Friday 17:00 Python Homework 22.06.03

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

Read More

29 May Friday 17:00 Python Homework 22.05.27

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

Read More

23 May Friday 17:00 Python Homework 22.05.20

Question 1: We have a list of following: zoo = ['monkeys', 'tigers', 'pandas', 'penguins', 'giraffes', 'hippos', 'bears'] how to retrieve a slice of list zoo, so you can get the following result? ['monkeys', 'pandas', 'giraffes', 'bears'] Question 2: from the same list of zoo in the question 1, how to retrieve...

Read More

24 Apr Friday 17:00 Python Homework 22.04.22

Question 1: Use while loop (NOT for loop) to create the multiplication table program. After asking which table the user wants, ask her how high the table should go. The output should look like this: Sample Input: Which multiplication table would you like? 7 How high do you want to go? 12 Sample Output: Here’s...

Read More

24 Mar Friday 17:00 Python Homework 22.03.18

Question: 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: print('Welcome to the adventureland!') h = int(input('Height:')) if h < 90:    c = 'red' elif h <...

Read More