TORONTO KIDS COMPUTER CLUB | admin
1
archive,paged,author,author-admin,author-1,paged-195,author-paged-195,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Author: admin

11 Dec Monday Online Python Homework 12.10.

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. How to get average number of the following  list mynumber? mynumber = ['3', '6', '2', '8',...

Read More

11 Dec Sunday 12:00 Python Homework 12.09.

Question: Using function or object method to write a program to return the number of times that the string "code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count. For example: 'aaacodebbb' will have 1 "code" 'codexxcode' will have 2 "code" 'cozexxcope'...

Read More

11 Dec Sunday 9:45 Python Homework 12.09.

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

Read More

11 Dec Saturday 12:00 Python Homework 12.08.

Question: Using function or object method to write a program to return the number of times that the string "code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count. For example: 'aaacodebbb' will have 1 "code" 'codexxcode' will have 2 "code" 'cozexxcope'...

Read More

05 Dec Sunday 9:45 Python Homework 12.02.

Question 1:(please use function that return a value) Write a program to display information to a driver based on his/her speed according to the following table: km/h over the limit Fine 1 to 20 $100 21 to 30 $270 31 or above $500 Sample Input 1: Enter the speed limit: 40 Enter the recorded speed of the...

Read More