10 Aug Aurora Tuesday 10:30 Python Test 21.08.10.
1. What is the output of print mystr * 2 if mystr = 'Hello World!'? A. Hello World * 2 B. Hello World! Hello World! C. Hello Hello D. mystr mystr2. Which of...
1. What is the output of print mystr * 2 if mystr = 'Hello World!'? A. Hello World * 2 B. Hello World! Hello World! C. Hello Hello D. mystr mystr2. Which of...
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...
Question: 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 in quadrant 1 since...
Question 1: Write a program by using counting loop (for loop) to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this: Sample Input: Which multiplication table would you like? 5 Sample...
Question 1: A school has following rules for grading system: Below 25 - F 25 to 45 - E 46 to 50 - D 51 to 59 - C 61 to 80 - B Above 80 - A Write a program to ask user to enter marks...
Question: There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to establish only a surface track. Moreover, it turned out that the station could...
Question: In the previous class we wrote the code to move the circle in left, right, up and down using the W-A-S-D keys. Continue with the code, and try to also add the code to move the circle in left, right , up and down using the...
Question: You are keeping score for a baseball game with strange rules. The game consists of several rounds, where the scores of past rounds may affect future rounds' scores. At the beginning of the game, you start with an empty record. You are given a list of...
Question 1: Using input() function in python, get the firstname and lastname, then print a message with your firstname and lastname Question 2: Using the input() function in python, get two integers named num1 and num2. Print the addition, subtraction, multiplication and division of num1 and num2...
Question: Given a list as below [10,2,8,6,5,7,7,7,7,2] Print the mean, median and mode of the above list of numbers. If you need to know what median, mean and mode is, please read the article https://www.purplemath.com/modules/meanmode.htm ...