Python Continued Lesson 4 – Make 3
Write a program to display the squares of all numbers from 1 up to an inputted number.
Python Continued Lesson 4 – Make 3 Read More »
Write a program to display the squares of all numbers from 1 up to an inputted number.
Python Continued Lesson 4 – Make 3 Read More »
Write a program which prompts the user to enter a short message and the number of times it is to be displayed and then displays the message the required number of times.
Python Continued Lesson 4 – Make 2 Read More »
Write a program that displays an inputted string on the screen 4 times using the ‘for loop’.
Python Continued Lesson 4 – Make 1 Read More »
The ‘x’ variable is a counter variable which starts at zero and goes up by one on each loop. Modify the code so that the print statement outputs the 5 times table (instead of a countdown). Below, state the modifications you made and how your modified code works.
Python Continued Lesson 4 – Modify Read More »
Using the python IDE below, investigate the following and explain your findings in the text area below. 1. What happens if you alter the value in the range() brackets to 20? Explain the result. 2. What happens if you put another number BEFORE the current number in the range() brackets (e.g. range(5, 10)? Explain the
Python Continued Lesson 4 – Investigate Read More »
Now type the code into the IDE below and run the program to see the code’s output.
Python Continued Lesson 4 – Run Read More »
Study the code below: import time for x in range(10): print(10-x) time.sleep(1) print(“Blast Off!”)
Python Continued Lesson 4 – Predict Read More »
Create a program that takes a number and prints all even numbers from 2 up to and including that number if it’s even, using a while loop.
Python Continued Lesson 3 – Make 4 Read More »
Write a program that asks for a number and then counts down from that number to 1, printing each number on a new line.
Python Continued Lesson 3 – Make 3 Read More »
Create a program which asks for a number and then prints a 1, then a 2, then a 3 up to the inputted number.
Python Continued Lesson 3 – Make 2 Read More »