TORONTO KIDS COMPUTER CLUB | Tuesday 17:30 Homework
140

# Tuesday 17:30 Homework

## 14 DecTuesday 17:00 Python Practice – 22.12.13.

Question 1: The general problem of balancing and nesting different kinds of opening and closing symbols occurs frequently. Strings of symbols such as { { ( [ ] [ ] ) } ( ) } [ [ { { ( ( ) ) } } ] ] [ ] [...

## 11 DecTuesday 17:00 Python Practice – 22.12.06.

Question: We have learned infix, prefix and postfix, please write the missing prefix and postfix in the table blow: infix prefix postfix A+B +AB AB+ A+B*C +A*BC ABC*+ (A+B)*C *+ABC AB+C* A+B*C+D ++A*BCD ABC*+D+ (A+B)*(C+D) A*B+C*D A+B+C+D ...

## 04 DecTuesday 17:00 Python Practice – 22.11.29.

Problem Description  Suppose we have a number like 12. Let’s define shifting a number to mean adding a zero at the end. For example, if we shift that number once, we get the number 120. If we shift the number again we get the number 1200....

## 26 NovTuesday 17:00 Python Practice – 22.11.22.

Question: Create Card class so it can complete the following tasks: You can initial the card with value. you can compare two card object like c1>c2. you can use print(c1) shows the card value (Assume the smallest card value is 2, then followed by 3,4,5,6,7,8,9,10,J,Q,K,A) ...

## 20 NovTuesday 17:00 Python Practice – 22.11.15.

Question 1: Create a dictionary variable personalInfo. The keys will be the information to be filled, such as: name, age, address, etc. The values is the personal detailed info, such as: Kevin, 19, 123 King St, etc. Question 2: From the dictionary created above, make two lists (make sure...

## 14 NovTuesday 17:00 Python Practice – 22.11.08.

Question: A fish-finder is a device used by anglers to find fish in a lake. If the fish-finder finds a fish, it will sound an alarm. It uses depth readings to determine whether to sound an alarm. For our purposes, the fish-finder will decide that a...

## 06 NovTuesday 17:00 Python Practice – 22.11.01.

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

## 29 OctTuesday 17:00 Python Practice – 22.10.25.

Question: Problem Description You are trying to pass the time while at the optometrist. You notice there is a grid of four numbers: 1 2 3 4 You see lots of mirrors and lenses at the optometrist, and wonder how flipping the grid horizontally or vertically would change the grid. Specifically, a...

## 23 OctTuesday 17:00 Python Practice – 22.10.18.

Question 1： You and your friend have come up with a way to send messages back and forth. Your friend can encode a message to you by writing down a positive integer N and a symbol. You can decode that message by writing out that symbol N times in a row...

## 15 OctTuesday 17:00 Python Practice – 22.10.11.

Question: Eric works in a door mat manufacturing company. One day, he designed a new door mat with the following specifications: ◦ Mat size must be A x B. (A is an odd natural number, and B is 3 times A.) ◦ The design should have ‘WELCOME’ written in...