Question
: Make a class Game it has attributes (game_name,game_id,Price), Game Game_name Game id Price Savegame() Deletegame() Searchgame() Updategame(); check_user_age() Savegame() Using file handling save the
: Make a class Game it has attributes (game_name,game_id,Price),
Game
|
Savegame()
Using file handling save the fame record in a text file.
Deletegame()
Delete the records from file by specifying the game name.
Updategame();
Update the game record by specifying the game name.
Searchgame()
If the user enter the game name, the code should search the game from the text file.
check_user_age()
Code the one function check_user_age() if the input value is less than 18 then raise an exception using exception handling that user can not play game because the age of the users age is less than 18.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started