The first step is to create a Python programme that can write data to a file. Th
The first step is to create a Python programme that can write data to a file. The data is made up of a sequence of entries, each of which has two fields: a name of sales with its achieved target (assuming that the achieved traget should be above 500$ to be added to the file and that there is a requirement for input validation). Ideally, your program should: Allow the user to enter the number of records that they are required to enter by prompting them to do so. Example: Enter the number of records that you need to enter: 3 Enter the name: Salim Mamdouh Enter the target: 800 Enter the name: Rami Saad Enter the target: 1000 Enter the name: Sammer Marwan Enter the target: 2000 Enter the name: Hiba Fakri Enter the target: 100 The created file will be ii. Write the data to the file, making sure that each value that is entered is written on a page of its own. The following is an illustration of what the output of your programme ought to be (it is important to note that you should not utilise the same inputs): The expected output, based on the above records should be as follows: High target: 2000 Held By: Sammer Marwan Number of Scores: 3
Leave a Reply