Write a Python program that performs the required tasks below. Input is entered by the user.
1. Find the sum of the series S=1-22+32...+n². (1 point)
The output should be:
Your selection (1 -> 3):
1
Enter the number of terms: 5
OUTPUT
15
2. Print a empty inverted right-angle triangle with numbers. (1 point)
The output should be:
Your selection (1 -> 3):
2
Enter the number of rows: 5
OUTPUT
1 2 3 4 5
1
1 3
12
1
3. count repeated characters in a string and represent it as a dictionary. (1 point)
+ 100%
4
Zoom
Close