PP Assignment 6
PP Assignment 6
1. Define a function that can receive two integer numbers form user and
compute their sum and then print it on console.
2. Write a function which takes a text and encrypts it with a Caesar cipher.
This is one of the simplest and most commonly known encryption techniques.
Each letter in the text is replaced by a letter some fixed number of
positions further in the alphabet. What about decrypting the coded text?
The Caesar cipher is a substitution cipher.
4. Define a function that can accept two strings as input and concatenate
them and then print it in console.
5. Define a function which can print a dictionary where the keys are
numbers between 1 and 20 (both included) and the values are square of
keys.
6. Define a function which can generate a list where the values are square
of numbers between 1 and 20 (both included). Then the function needs to
print the first 5 elements in the list.
7. The Fibonacci Sequence is computed based on the following formula:
f(n)=0 if n=0
f(n)=1 if n=1
f(n)=f(n-1)+f(n-2) if n>1