TORONTO KIDS COMPUTER CLUB | Thursday Python 18:30
156

# Thursday Python 18:30

## 26 JunThursday 18:30 Python Practice 22.06.23.

Question: You are given a string . Suppose a character ‘a’ occurs consecutively n times in the string. Replace these consecutive occurrences of the character ‘a’ with (n, ‘a’) in the string. Input Format:  A single line of input consisting of the string . Output Format: A single line of...

## 19 JunThursday 18:30 Python Practice 22.06.16.

Question 1: Write a function luckySum(a, b, c) to calculate sum of given 3 int values, a b c. The function will have a return value of their sum. However, if one of the values is 13 then it does not count towards the sum and values to...

## 14 JunThursday 18:30 Python Practice 22.06.09.

Question: Make a function to verify whether the credit card numbers from ABCD Bank are valid or not. A valid credit card from ABCD Bank has the following characteristics: It must start with a 4, 5 or 6. It must contain exactly 16 digits. It must only...

## 05 JunThursday 18:30 Python Practice 22.06.02.

Question: Write a function to print your name in big letters, make sure you enter the name in lower case, like this: Hint: a = [ "###", "# #", "###", "# #", "# #"] b = [ "###", "# #", "###", "# #", "###"] c = [ "###", "# ",...

## 28 MayThursday 18:30 Python Practice 22.05.26.

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

## 23 MayThursday 18:30 Python Practice 22.05.19.

Question 1: （difficulty Level: *) A common problem in mathematics is to determine which quadrant a given point lies in. There are four quadrants, numbered from 1 to 4, as shown in the diagram below: For example, the point A, which is at coordinates (12, 5) lies...

## 13 MayThursday 18:30 Python Practice 22.05.12.

Question 1: Write a program for a movie theater using while loop. It will keep asking your age and display the ticket price, until you enter “quit”. It is free if you are less than 3 years old, otherwise if your age is less than 16...

## 07 MayThursday 18:30 Python Practice 22.05.05.

Question 1: Create a loop between 1 to 20. Print “fizz” if the number is divisible by 3 Print “bizz” if the number is divisible by 5 Print “fizzbizz” if a number is divisible by both 3 and 5. Otherwise, print the number itself. Question 2： Your hero...