Write a program that reads a task name on the first line of the input and then
carries out that task. Each task is a definite, counted repetition, so use for
loops with range().
Supported tasks
factorial — read an integer n and print n! (the product 1 * 2 * ... * n; print 1 when n is 0).even_numbers — read an integer n and print every even number from 0 up to and including n, one per line.power_sequence — read an integer n and print the first n powers of two (2**0, 2**1, …, 2**(n-1)), one per line.sum_not_divisible — read an integer n and print the sum of the integers from 1 up to but not including n that are divisible by neither 4 nor 5.from_k — read an integer n, then an integer k. Counting down from k to 1, look at the odd numbers whose decimal form contains neither the digit 5 nor the digit 9; print the first n such numbers with their digits reversed, one per line. Stop early if there are fewer than n of them.string_iter — read a line of digits. Print one number per line: each digit multiplied by the digit before it, where the digit before the first one is taken to be 1.list_iter — read one line containing a Python list literal, e.g. [1, 'a', 2.5]. For each element of the list print <element> - type: <its type>, using the f-string f'{i} - type: {type(i)}'.If the task name is none of the above, print Invalid.
Input format
The first line is the task name, followed by the line(s) that task reads.
Output format
Whatever the chosen task prints, as described above.
Write a complete program: read the input with input() and print the result with print().
Input
factorial
5
Output
120