Page 1 of 1

Compulsory Task 3 Follow these steps: . Create a Python file called amazon.py in this folder. Write code to read the con

Posted: Sun May 15, 2022 10:16 am
by answerhappygod
Compulsory Task 3 Follow These Steps Create A Python File Called Amazon Py In This Folder Write Code To Read The Con 1
Compulsory Task 3 Follow These Steps Create A Python File Called Amazon Py In This Folder Write Code To Read The Con 1 (110.92 KiB) Viewed 81 times
Compulsory Task 3 Follow These Steps Create A Python File Called Amazon Py In This Folder Write Code To Read The Con 2
Compulsory Task 3 Follow These Steps Create A Python File Called Amazon Py In This Folder Write Code To Read The Con 2 (66.1 KiB) Viewed 81 times
Compulsory Task 3 Follow These Steps Create A Python File Called Amazon Py In This Folder Write Code To Read The Con 3
Compulsory Task 3 Follow These Steps Create A Python File Called Amazon Py In This Folder Write Code To Read The Con 3 (50.17 KiB) Viewed 81 times
Please use Python
Compulsory Task 3 Follow these steps: . Create a Python file called amazon.py in this folder. Write code to read the content of the text file input.txt For each line in input.txt, write a new line in the new text file output.txt that computes the answer to some operation on a list of numbers. If the input.txt has the following: o Min: 1,2,3,5,6 o Max: 1,2,3,5,6 O Avg: 1,2,3,5,6 Your program should generate output.txt as follows: o The min of [1, 2, 3, 5, 6] is 1. o The max of [1, 2, 3, 5, 6] is 6. o The avg of [1, 2, 3, 5, 6] is 3.4. . Assume that the only operations given in the input file are min, max and avg, and that the operation is always followed by a list of comma-separated integers. . You should define the functions min, max and avg that take in a list of integers and return the min, max or avg of the list. Your program should handle any combination of operations and any length of input numbers. . You can assume that the list of input numbers are always valid integers and that the list is never empty. . Hint: there is something strange about the first line of input.txt..

Compulsory Task 1 Follow these steps: We will write a program called student_register.py that allows students to register for an exam venue. • First, ask the user how many students are registering. Create a for loop that runs for that amount of students Each loop asks for the student to enter their ID number. Write each of the ID numbers to a Text File called reg_form.txt This will be used as an attendance register that they will sign when they . . arrive at the exam venue.

Compulsory Task 2 Follow these steps: Create a new Python file in this folder called jokes.py You are going to create a random joke generator using Python's random module. This will require a bit of research on your part. For more information on the random module: https://pynative.com/python-random-module/ Create a list of jokes. Use the random module to display a random joke each time the code runs.