Python Assignment
Exercise 1
Print the Sum of a Current Number and a Previous number.
Your expected output should be:
Printing the current and previous number sum in a range(10)
Current Number 0, Previous Number 0, Sum: 0
Current Number 1, Previous Number 0, Sum: 1
Current Number 2, Previous Number 1, Sum: 3
Current Number 3, Previous Number 2, Sum: 5
Current Number 4, Previous Number 3, Sum: 7
Current Number 5, Previous Number 4, Sum: 9
Current Number 6, Previous Number 5, Sum: 11, etc
And accomplish this using f-string.
Exercise 2
Create a class called Create Stopwatch. Each stopwatch object
should have two methods: one to start(), which will start the
stopwatch, and a Second to stop(), which will stop the stopwatch
and print the seconds that have passed
Exercise 3
Create a function called is Palindrome, which will take any word as
a parameter and tell whether this word is a palindrome or not
and if the input parameter is not a string, then it will return saying
invalid type. (A palindrome is a word that is the
same as its reverse.)