Task1 Task2 Python

Task 1

Create a program called task1.py.
This program needs to display the timetables for any number.
For example, say the user enters 6 the program must print:
The 6 times table is:
6 x 1 = 6
6 x 2 = 12

6 x 12 = 72
Compile, save and run your file

Task 2

A simple rule to determine whether a year is a leap year is to test whether it is
a multiple of 4.
Create a program called task2.py.
Write a program to input a year and a number of years.
Then determine and display which of those years were or will be leap
years.
What year do you want to start with? 1994
How many years do you want to check? 8
1994 isn’t a leap year
1995 isn’t a leap year
1996 is a leap year
1997 isn’t a leap year
1998 isn’t a leap year
1999 isn’t a leap year
2000 is a leap year
2001 isn’t a leap year
Compile, save and run your file.

×
New Download