Computers and Technology, 14.12.2019 03:31, jabezslade22
Use python "files and exceptions"
1- modify the program you wrote for chapter 6 exercise 6 so it handles the following
exceptions:
• it should handle ioerror exceptions that are raised when the file is opened
and data is read from it by printing "trouble opening file. try again." and
not executing any more of the code.
• it should handle any valueerror exceptions that are raised when the items
that are read from the file are converted to a number by printing "file must have
only numbers. try again." and not executing any more of the code.
2- the springfork amateur golf club has a tournament every weekend. the club
president has asked you to write a program that will read each player's name
and score as keyboard input, and then save these as records in a file named
golf. txt.
first, have the program ask the user how many players they want to add to their
record. then, ask the user for each name and score individually.
golf. txt should be structured so that there is a line with the player's name,
folowed by their score on the next line.
emily
30
mike
20
jonathan
23
3- write a program that reads the records from the golf. txt file written in exercise
10a and prints them in the following format:
name: emily
score: 30
name: mike
score: 20
name: jonathan
score: 23
Answers: 1
Computers and Technology, 22.06.2019 17:30, uh8hardiek
Ou listened to a song on your computer. did you use hardware or software?
Answers: 2
Computers and Technology, 23.06.2019 17:00, osirisarellane3792
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
Use python "files and exceptions"
1- modify the program you wrote for chapter 6 exercise...
1- modify the program you wrote for chapter 6 exercise...
Mathematics, 15.01.2020 02:31
Mathematics, 15.01.2020 02:31
Mathematics, 15.01.2020 02:31
Mathematics, 15.01.2020 02:31
History, 15.01.2020 02:31
Biology, 15.01.2020 02:31
Mathematics, 15.01.2020 02:31