Professional Documents
Culture Documents
Tema 3
Tema 3
While:
1. Write a program that displays all natural numbers between 0 and 50.
2. Write a program that displays all even numbers between 0 and 100.
3. Write a program that displays the squares of all integers between 0 and
10.
4. Using the loop, write numbers from -20 to 20. Then write:
5. Write a program that displays numbers that are multiples of 5 and are
divisible by 7 within the range from 1500 to 2700.
6. Write a program that writes numbers from 0 to 6 and omits 3 and 6. Do it
in two versions: with and without the continue statement.
For:
4). Write a program that will display, one by one, all items together with their types
for a given list. For the following list:
a_list = [4, True, None]
the program should display the following result:
4 <class 'int'>
True <class 'bool'>
None <class 'NoneType'>