120 minutes
Exercise 1: (3 marks) Write a program that asks the user for a range (start and end) and the number of unique integers they want to generate within that range.
The program should then generate that many unique integers and store them in a list.Display the list, the average of these integers, and the minimum value in the list.
Result of the program:
Enter the start of the range: 10
Enter the end of the range: 30
How many unique integers would you like to generate? 5
Generated list of unique integers: [24, 25, 29, 12, 19]
Average of the integers: 21.8
Minimum value in the list: 12
Exercise 2: (3 marks)
Write a program named filter_even_numbers that reads a text file named integers_data.txt, extracts all even numbers, and saves them to a new file named even numbers.txt.
Result of the program:
Content of the input file (integers_data.txt):
1 2 3 4 5 6 7 8 9 10
Content of the output file (even_numbers.txt):
2 4 6 8 10
Exercise 3: (4 marks)
Write a program that implements the following tasks:
• Read employee, project, and employee-project relationship information from the COU Gloomalone
+ 100%
Zoom
Close