Question 1 (3 points)
Write a Python program that performs the required tasks
below. Input is entered by the user.
1. Find the sum of the series
1
1
1
S = 1- +
(-1)+1
-
+
...+
n"
with n≤1. Round and
22 33 4₁
get the result after 4 decimal places. (1 point)
The output should be:
1
Your selection (1 -> 3):
Enter the number of terms: 5
OUTPUT
0.7835
2. Split string into words and sort alphabetically. (1)
point)
The output should be:
2
Your selection (1 -> 3):
Enter a string: python java c++ javascript
OUTPUT
L'C++'
"Java' Havascript!
'python l
Zoom
+ 100%
Close