TORONTO KIDS COMPUTER CLUB | archives
141
archive,paged,category,category-archives,category-141,paged-11,category-paged-11,ajax_fade,page_not_loaded,,no_animation_on_touch,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

archives

29 Jan Aurora Monday 18:30 Python Homework 20.01.27.

Question 1: Make a function that will allow you to print any name, address, street, city, state or province, zip or postal code, and country in the world. (Hint: It needs seven arguments. You can pass them as individual arguments or as a list.) Question 2: Write a function to calculate the total value of some change—quarters,...

Read More

11 Dec PMCA Sunday 10:00 Java 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

11 Dec Aurora Monday 18:30 Python Homework 12.09.

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’] >>>“, “.join(fruit) >>> ‘avocados, bananas, oranges, grapes, mangoes’ Question 2: Create a list called...

Read More