TheXnator wrote:
TimeForPug wrote:
TheXnator wrote:
Oh hey that's the first ever task my Computing teacher gave my class...
pastebin.com/FZgy7k9c
Wanna do all my other ones for my cm vote
Depends what the others are sir
Write a program that prints even numbers up to 20.
The output should be –
0
2
4
6
8
10
12
14
16
18
20
It seems Bert is a bit of a maths fan! He loves square numbers so much that he decided to write a python program to print out the first 100 of them. He managed to write some of the code but he got stuck with the while loop. Your task is simple. Finish off the while loop.
x = 1
while :
print("The square of " + x + " is " + x * x)
The best way to fall asleep is to count backwards from 100 to 1. Of course this would be the perfect candidate for a python program. Goes without saying!
Write a program which will output the numbers from 100 to 1. Sample output would be –
100
99
98
.. etc
Those are what i got a detention for so can you do them pls