SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
To create a parking garage class with Object Oriented Programming(OOP) using Python. Your
parking gargage class should have the following methods: - take_ticket - This should decrease the
amount of tickets available by 1 - This should decrease the amount of parking_spaces available by
1 - pay_for_parking - Display an input that waits for an amount from the user and store it in a
variable - If the payment variable is not empty then -> display a message to the user that their
ticket has been paid and they have 15mins to leave - This should update the "current_ticket"
dictionary key "paid" to True -leave_garage - If the ticket has been paid, display a message of
"Thank You, have a nice day" - If the ticket has not been paid, display an input prompt for payment
- Once paid, display message "Thank you, have a nice day!" - Update parking_spaces list to
increase by 1 - Update tickets list to increase by 1 You will need a few attributes as well: - tickets -
> list - parking_spaces -> list - current_ticket -> dictionary

Contenu connexe

Plus de ajayadinathcomputers

True or False The term drive time are during the times peop.pdf
True or False The term drive time are during the times peop.pdfTrue or False The term drive time are during the times peop.pdf
True or False The term drive time are during the times peop.pdfajayadinathcomputers
 
Translate this function into MIPS assembly Remember the arg.pdf
Translate this function into MIPS assembly Remember the arg.pdfTranslate this function into MIPS assembly Remember the arg.pdf
Translate this function into MIPS assembly Remember the arg.pdfajayadinathcomputers
 
True or False Four Asian Tigers Four Little Dragons we.pdf
True or False Four Asian Tigers Four Little Dragons we.pdfTrue or False Four Asian Tigers Four Little Dragons we.pdf
True or False Four Asian Tigers Four Little Dragons we.pdfajayadinathcomputers
 
True or False In Exercises 15 determine whether the state.pdf
True or False In Exercises 15 determine whether the state.pdfTrue or False In Exercises 15 determine whether the state.pdf
True or False In Exercises 15 determine whether the state.pdfajayadinathcomputers
 
True or False 1 If buyer refuses to accept conforming goods.pdf
True or False 1 If buyer refuses to accept conforming goods.pdfTrue or False 1 If buyer refuses to accept conforming goods.pdf
True or False 1 If buyer refuses to accept conforming goods.pdfajayadinathcomputers
 
True or false and explain1 Mr Viet use some of his income t.pdf
True or false and explain1 Mr Viet use some of his income t.pdfTrue or false and explain1 Mr Viet use some of his income t.pdf
True or false and explain1 Mr Viet use some of his income t.pdfajayadinathcomputers
 
True or False Airway resistance decreases with parasympathe.pdf
True or False Airway resistance decreases with parasympathe.pdfTrue or False Airway resistance decreases with parasympathe.pdf
True or False Airway resistance decreases with parasympathe.pdfajayadinathcomputers
 
True False Question 10 1 point The congruence class repres.pdf
True False Question 10 1 point The congruence class repres.pdfTrue False Question 10 1 point The congruence class repres.pdf
True False Question 10 1 point The congruence class repres.pdfajayadinathcomputers
 
Transcription 1 RNA vs DNA structure 2 Differentiate betwe.pdf
Transcription 1 RNA vs DNA structure 2 Differentiate betwe.pdfTranscription 1 RNA vs DNA structure 2 Differentiate betwe.pdf
Transcription 1 RNA vs DNA structure 2 Differentiate betwe.pdfajayadinathcomputers
 
Trident Food Corporation en son mali yl iin aadaki gelir t.pdf
Trident Food Corporation en son mali yl iin aadaki gelir t.pdfTrident Food Corporation en son mali yl iin aadaki gelir t.pdf
Trident Food Corporation en son mali yl iin aadaki gelir t.pdfajayadinathcomputers
 
Tropical rain forests in Indonesia and South America receive.pdf
Tropical rain forests in Indonesia and South America receive.pdfTropical rain forests in Indonesia and South America receive.pdf
Tropical rain forests in Indonesia and South America receive.pdfajayadinathcomputers
 
TRIPBAMs core produt development was an IT Dependant Strate.pdf
TRIPBAMs core produt development was an IT Dependant Strate.pdfTRIPBAMs core produt development was an IT Dependant Strate.pdf
TRIPBAMs core produt development was an IT Dependant Strate.pdfajayadinathcomputers
 
Tristan tried his luck with the lottery He can win 100 if .pdf
Tristan tried his luck with the lottery He can win 100 if .pdfTristan tried his luck with the lottery He can win 100 if .pdf
Tristan tried his luck with the lottery He can win 100 if .pdfajayadinathcomputers
 
Tres aos hace Mario se uni a MN Partnership aportando t.pdf
Tres aos hace Mario se uni a MN Partnership aportando t.pdfTres aos hace Mario se uni a MN Partnership aportando t.pdf
Tres aos hace Mario se uni a MN Partnership aportando t.pdfajayadinathcomputers
 
Trey Monson starts a merchandising business on December 1 an.pdf
Trey Monson starts a merchandising business on December 1 an.pdfTrey Monson starts a merchandising business on December 1 an.pdf
Trey Monson starts a merchandising business on December 1 an.pdfajayadinathcomputers
 
Tree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdfTree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdfajayadinathcomputers
 
TRAVHLCO LAITHD Trwelos is a larye UK packape holdidy mancu.pdf
TRAVHLCO LAITHD Trwelos is a larye UK packape holdidy mancu.pdfTRAVHLCO LAITHD Trwelos is a larye UK packape holdidy mancu.pdf
TRAVHLCO LAITHD Trwelos is a larye UK packape holdidy mancu.pdfajayadinathcomputers
 
Topic Obstructive Sleep Apnea Explain why this topic is imp.pdf
Topic Obstructive Sleep Apnea Explain why this topic is imp.pdfTopic Obstructive Sleep Apnea Explain why this topic is imp.pdf
Topic Obstructive Sleep Apnea Explain why this topic is imp.pdfajayadinathcomputers
 
Topics 1 The role of cryptography as it relates to network.pdf
Topics 1 The role of cryptography as it relates to network.pdfTopics 1 The role of cryptography as it relates to network.pdf
Topics 1 The role of cryptography as it relates to network.pdfajayadinathcomputers
 
Translate function f into MIPS assembly language If you nee.pdf
Translate function f into MIPS assembly language If you nee.pdfTranslate function f into MIPS assembly language If you nee.pdf
Translate function f into MIPS assembly language If you nee.pdfajayadinathcomputers
 

Plus de ajayadinathcomputers (20)

True or False The term drive time are during the times peop.pdf
True or False The term drive time are during the times peop.pdfTrue or False The term drive time are during the times peop.pdf
True or False The term drive time are during the times peop.pdf
 
Translate this function into MIPS assembly Remember the arg.pdf
Translate this function into MIPS assembly Remember the arg.pdfTranslate this function into MIPS assembly Remember the arg.pdf
Translate this function into MIPS assembly Remember the arg.pdf
 
True or False Four Asian Tigers Four Little Dragons we.pdf
True or False Four Asian Tigers Four Little Dragons we.pdfTrue or False Four Asian Tigers Four Little Dragons we.pdf
True or False Four Asian Tigers Four Little Dragons we.pdf
 
True or False In Exercises 15 determine whether the state.pdf
True or False In Exercises 15 determine whether the state.pdfTrue or False In Exercises 15 determine whether the state.pdf
True or False In Exercises 15 determine whether the state.pdf
 
True or False 1 If buyer refuses to accept conforming goods.pdf
True or False 1 If buyer refuses to accept conforming goods.pdfTrue or False 1 If buyer refuses to accept conforming goods.pdf
True or False 1 If buyer refuses to accept conforming goods.pdf
 
True or false and explain1 Mr Viet use some of his income t.pdf
True or false and explain1 Mr Viet use some of his income t.pdfTrue or false and explain1 Mr Viet use some of his income t.pdf
True or false and explain1 Mr Viet use some of his income t.pdf
 
True or False Airway resistance decreases with parasympathe.pdf
True or False Airway resistance decreases with parasympathe.pdfTrue or False Airway resistance decreases with parasympathe.pdf
True or False Airway resistance decreases with parasympathe.pdf
 
True False Question 10 1 point The congruence class repres.pdf
True False Question 10 1 point The congruence class repres.pdfTrue False Question 10 1 point The congruence class repres.pdf
True False Question 10 1 point The congruence class repres.pdf
 
Transcription 1 RNA vs DNA structure 2 Differentiate betwe.pdf
Transcription 1 RNA vs DNA structure 2 Differentiate betwe.pdfTranscription 1 RNA vs DNA structure 2 Differentiate betwe.pdf
Transcription 1 RNA vs DNA structure 2 Differentiate betwe.pdf
 
Trident Food Corporation en son mali yl iin aadaki gelir t.pdf
Trident Food Corporation en son mali yl iin aadaki gelir t.pdfTrident Food Corporation en son mali yl iin aadaki gelir t.pdf
Trident Food Corporation en son mali yl iin aadaki gelir t.pdf
 
Tropical rain forests in Indonesia and South America receive.pdf
Tropical rain forests in Indonesia and South America receive.pdfTropical rain forests in Indonesia and South America receive.pdf
Tropical rain forests in Indonesia and South America receive.pdf
 
TRIPBAMs core produt development was an IT Dependant Strate.pdf
TRIPBAMs core produt development was an IT Dependant Strate.pdfTRIPBAMs core produt development was an IT Dependant Strate.pdf
TRIPBAMs core produt development was an IT Dependant Strate.pdf
 
Tristan tried his luck with the lottery He can win 100 if .pdf
Tristan tried his luck with the lottery He can win 100 if .pdfTristan tried his luck with the lottery He can win 100 if .pdf
Tristan tried his luck with the lottery He can win 100 if .pdf
 
Tres aos hace Mario se uni a MN Partnership aportando t.pdf
Tres aos hace Mario se uni a MN Partnership aportando t.pdfTres aos hace Mario se uni a MN Partnership aportando t.pdf
Tres aos hace Mario se uni a MN Partnership aportando t.pdf
 
Trey Monson starts a merchandising business on December 1 an.pdf
Trey Monson starts a merchandising business on December 1 an.pdfTrey Monson starts a merchandising business on December 1 an.pdf
Trey Monson starts a merchandising business on December 1 an.pdf
 
Tree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdfTree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdf
 
TRAVHLCO LAITHD Trwelos is a larye UK packape holdidy mancu.pdf
TRAVHLCO LAITHD Trwelos is a larye UK packape holdidy mancu.pdfTRAVHLCO LAITHD Trwelos is a larye UK packape holdidy mancu.pdf
TRAVHLCO LAITHD Trwelos is a larye UK packape holdidy mancu.pdf
 
Topic Obstructive Sleep Apnea Explain why this topic is imp.pdf
Topic Obstructive Sleep Apnea Explain why this topic is imp.pdfTopic Obstructive Sleep Apnea Explain why this topic is imp.pdf
Topic Obstructive Sleep Apnea Explain why this topic is imp.pdf
 
Topics 1 The role of cryptography as it relates to network.pdf
Topics 1 The role of cryptography as it relates to network.pdfTopics 1 The role of cryptography as it relates to network.pdf
Topics 1 The role of cryptography as it relates to network.pdf
 
Translate function f into MIPS assembly language If you nee.pdf
Translate function f into MIPS assembly language If you nee.pdfTranslate function f into MIPS assembly language If you nee.pdf
Translate function f into MIPS assembly language If you nee.pdf
 

Dernier

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Dernier (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

To create a parking garage class with Object Oriented Progra.pdf

  • 1. To create a parking garage class with Object Oriented Programming(OOP) using Python. Your parking gargage class should have the following methods: - take_ticket - This should decrease the amount of tickets available by 1 - This should decrease the amount of parking_spaces available by 1 - pay_for_parking - Display an input that waits for an amount from the user and store it in a variable - If the payment variable is not empty then -> display a message to the user that their ticket has been paid and they have 15mins to leave - This should update the "current_ticket" dictionary key "paid" to True -leave_garage - If the ticket has been paid, display a message of "Thank You, have a nice day" - If the ticket has not been paid, display an input prompt for payment - Once paid, display message "Thank you, have a nice day!" - Update parking_spaces list to increase by 1 - Update tickets list to increase by 1 You will need a few attributes as well: - tickets - > list - parking_spaces -> list - current_ticket -> dictionary