Week 11 Programming Assignment 1
Input format :
The positive even integer
the total number of ways to express ‘n’ as a sum of only even positive integers else invalid
Example
Week 11 Programming Assignment 2
Give a string, remove all the punctuations in it and print only the words in it.
Input format : the input string with punctuations
Output format : the output string without punctuations
Example
input
“Wow!!! It’s a beautiful morning”
output
Wow Its a beautiful morning
Week 11 Programming Assignment 3
print the number of binary sequences of length ‘n’ that have no consecutive 0’s
Input format : A number 'n'
Output format : number of binary sequences of length 'n' with no consecutive 0's else invalid
Example
input
3
output
5
Explanation:
When n = 3, number of binary digits is 3.
all possible combinations of 3 binary digits are
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
out of these eight possibilities, 5 have binary sequences and have no consecutive 0’s. Hence the number of binary sequences of length 3 is 5.