Question: File Assignment: Let's imagine that you'd like to write a Python program to keep track of your pet's rabies shots and that the program will
File Assignment:
Let's imagine that you'd like to write a Python program to keep track of your pet's rabies shots and that the program will save the data to a .txt file.
Name your file, mypet, submit your python code and text file in Canvas.
The program should ask you for the pet's name, the species (dog, cat, kangaroo, etc.), the date of the last shot and whether it was a 1 year or 3 years shot.
Sample Execution:
Please enter the pet's name: Froggy
Please enter the pet's species: dog
Please enter the date of the pet's last rabies shot: 9/1/22
Please enter whether it was a 1 year or 3 year shot (1/3): 1
Do you wish to enter data for another pet? y/n y
Please enter the pet's name: Kit
Please enter the pet's species: cat
Please enter the date of the pet's last rabies shot: 3/4/22
Please enter whether it was a 1 year or 3 year shot (1/3): 3
Do you wish to enter data for another pet? y/n n
This data was saved to the file:
Froggy,dog,9/1/22,1
Kit,cat,3/4/22,3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
