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

Uncategorized

29 Mar Friday 17:00 Python Practice 21.03.26.

Question for Sorting: Question 1: You are given an array A of non-negative integers of size m. Your task is to sort the array in non-decreasing order and print out the original indices of the new sorted array. Example: A= 4,5,3,7,1 After sorting the new array becomes A= 1,3,4,5,7 The required output should be...

Read More

27 Mar Monday 20:00 Python Practice 21.03.22.

Question:Create Card class so it can complete the following tasks: Card() – You can initial the card with random value (Assume the smallest card value is ‘2’, then followed by ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’, ’10’, ‘J’, ‘Q’, ‘K’, ‘A’) and according rank (integer...

Read More

23 Mar PMCA Sunday 10:00 Practice -03.21

Use Stack to solve the following question: You are given an array A of Q integers and Q queries. In each query, you are given an integer i (1≤i≤N). Your task is to find the minimum index greater than i (1≤i≤N) such that: Sum of digits of Ai is greater than the sum of digits of Aj Ai < Aj If there is no answer, then print -1. Input...

Read More

19 Mar Tuesday 17:30 Python Homework 21.03.16.

Question 1: Please use 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 your...

Read More