All tasks should be submitted via gitlab. Task1 and Task3 are mandatory. Without completing them, Task2 and Task4 won’t be graded.
Task 1 (1p)
- Create two lists, one for numbers and another for strings
- Each list should contain at least 5 elements. Let user enter the values for elements (input)
- Create a function, which will calculate and print the sum of elements from numbers list
- Create a function, which will print reversed strings from strings list
Task 2 (1p) [optional]
- Create file with at least 15 lines of text (manually)
- Read 10 characters from the file, print. Repeat this 3 times.
- Continue reading file line by line.
- Calculate and print total character number in the file.
- Add the following text `END TEXT` to the file.
- Ask user for input.
- Input should be not less than 30 characters and not more than 50 characters.
- If the condition isn’t met, ask again.
- Write the inputted text to a file.
Task4 (0.5p) [optional]
- Ask user to enter text and split the text by comma.
- (use at least 5 commas)
- Calculate the number of letters and digits in each part.
- Use functions with arguments