Loops, Function, Tuples, Lists and Dictionary in Python
Task 1
Write a program of simple calculator program. Follow the steps below,
Declare and define a function name Menu which displays a list of choices for user such as addition, subtraction, multiplication etc. It takes the choice from user as an input and return.
Define and declare a separate function for each choice.
In the main body of the program call respective function depending on user’s choice.
Program should not terminate till user chooses last option that is “Quit”.
Task 2
Write a method to calculate Fibonacci Series up to ‘n’ points. After calculating the series, the method should return to the main.
Task 3
Write a program to calculate factorial of a number entered by user.
Task 4
Write a program that lets the user enter in some English text, then convert the text to Pig-latin.
Task 5 (Home Task)
Splits the string |text| by whitespace and returns two things as a pair: the set of words that occur the maximum number of times, and their count, i.e. (set of words that occur the most number of times, that maximum number/count) You might find it useful to use collections. Counter().