PYTHON PROJECT
Name-Aryan Raj
SAP Id-500126035
Enrolment Number-R2142231925
School- School Of Computer Science
Branch-Btech-CSE
Batch-55
Submitted to-Mr Touseef Iqbal
This code is about IPL ticket booking which is implemented in Python. It allows users to select a team, choose their ticket type, select a payment method,
and then generates a ticket number for them
This Python code simulates an IPL ticket booking system.
It allows users to:
1.View a list of available teams.
2.Select a team to watch.
3.See the stadium where the match will be played.
4.Choose a ticket type (premium, vip, or basic) based on price information provided.
5.Select a payment method from available options (PhonePay, GooglePay, NetBanking).
6.Generate a random ticket number upon successful booking.
The code includes functions for:
-Displaying teams
-Selecting a stadium based on chosen team
-Selecting a ticket type with validation
-Selecting a payment method with validation
-Generating a random ticket number
.
Description About Code
python basic and advnacved easy tutorial.pptx
python basic and advnacved easy tutorial.pptx
python basic and advnacved easy tutorial.pptx
The provided code is a Python program for an IPL (Indian Premier League) Ticket Booking System.
Let's break down the code and describe each component in detail.
1.Team and Stadium Information:
The teams dictionary stores information about different IPL teams. Each team is represented by a key, and its
corresponding value is another dictionary containing details such as the stadium where the team plays and the ticket
prices for different categories (premium, VIP, basic).
2.Payment Methods:
The payment_methods list stores the available payment methods for booking tickets.
3.Helper Functions:
generate_ticket_number(): This function generates a random ticket number consisting of uppercase letters and
digits.
display_teams(): This function displays the list of IPL teams and prompts the user to select a team.
select_stadium(team): This function takes a selected team as input and prompts the user to choose a ticket type
(premium, VIP, basic) for the selected team's match.
select_payment_method(): This function prompts the user to select a payment method from the available options.
4.Main Functionality:
The main() function serves as the entry point of the program.
It starts by displaying a welcome message and the list of IPL teams using the display_teams() function.
It then prompts the user to select a team by entering the corresponding number.
After selecting a team, it calls the select_stadium() function to choose the ticket type (premium, VIP, basic) for the selected
team's match.
Once the ticket type is selected, it displays the chosen ticket type and prompts the user to select a payment method using the
select_payment_method() function.
After selecting the payment method, it generates a random ticket number using the generate_ticket_number() function.
Finally, it prints a confirmation message along with the generated ticket number.
5.Execution:
The if __name__ == "__main__": block ensures that the main() function is executed when the script is run directly.
6.Improvement Suggestions:
Error Handling: The code includes basic error handling for invalid inputs, but more comprehensive error handling could be
implemented.
User Experience Enhancement: Adding more user-friendly messages and a summary of booking details can improve the user
experience.
Modularization and Documentation: Further modularization and documentation can enhance code readability and
maintainability.
Consistency in Output: Ensuring consistency in the output format throughout the program can provide a better user
experience.
Overall, the provided code efficiently facilitates the booking of IPL tickets by guiding the user through the selection of teams,
ticket types, and payment methods.
IPL Ticket Booking

More Related Content

PDF
Create a fantasy cricket game in python.ppt
 
PDF
C++ programmingThank you Description of the Program Writ.pdf
PDF
user interface web GUI based on game predtiction
DOC
Srs mine
PPTX
a ppt designed for project on ipl win predictor
PDF
IRJET-V8I11270.pdf
PPTX
Skill on Sports
PDF
A Review on Unified Payment Interface [UPI]
Create a fantasy cricket game in python.ppt
 
C++ programmingThank you Description of the Program Writ.pdf
user interface web GUI based on game predtiction
Srs mine
a ppt designed for project on ipl win predictor
IRJET-V8I11270.pdf
Skill on Sports
A Review on Unified Payment Interface [UPI]

Similar to python basic and advnacved easy tutorial.pptx (20)

PPT
Enterprise Structure, Personnel Structure SAP HCM.ppt
PPT
Enterprise Structure, Personnel Structure SAP HCM.ppt
PPT
Enterprise Structure, Personnel Structure SAP HCM.ppt
PDF
Cinema Ticket Selling System
PPTX
Cricket_auction-app-for-cricket-auction.pptx
DOC
Online Bus Reservation
DOC
Devry cis 115 final exam 3
DOC
Devry cis 115 final exam 3
PDF
Cricket Score and Winning Prediction
PDF
the code below is a recommendation system application to suggest a s.pdf
DOC
Devry cis 115 final exam 1
DOC
Devry cis 115 final exam 1
DOCX
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
PDF
An Effective Authentication Method using Improved Persuasive Cued Click Points
DOCX
Abstract of Business card management System
PDF
Pixel s2 s manual
PPTX
Delivery type & Delivery item category and Billing type and customer Account ...
PDF
PDF
Draftkings clone
PDF
CIS 115 Effective Communication - tutorialrank.com
Enterprise Structure, Personnel Structure SAP HCM.ppt
Enterprise Structure, Personnel Structure SAP HCM.ppt
Enterprise Structure, Personnel Structure SAP HCM.ppt
Cinema Ticket Selling System
Cricket_auction-app-for-cricket-auction.pptx
Online Bus Reservation
Devry cis 115 final exam 3
Devry cis 115 final exam 3
Cricket Score and Winning Prediction
the code below is a recommendation system application to suggest a s.pdf
Devry cis 115 final exam 1
Devry cis 115 final exam 1
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
An Effective Authentication Method using Improved Persuasive Cued Click Points
Abstract of Business card management System
Pixel s2 s manual
Delivery type & Delivery item category and Billing type and customer Account ...
Draftkings clone
CIS 115 Effective Communication - tutorialrank.com
Ad

Recently uploaded (20)

PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
Comparative analysis of machine learning models for fake news detection in so...
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
STKI Israel Market Study 2025 version august
PPTX
Configure Apache Mutual Authentication
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
PDF
Developing a website for English-speaking practice to English as a foreign la...
Custom Battery Pack Design Considerations for Performance and Safety
A review of recent deep learning applications in wood surface defect identifi...
Consumable AI The What, Why & How for Small Teams.pdf
The influence of sentiment analysis in enhancing early warning system model f...
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Comparative analysis of machine learning models for fake news detection in so...
TEXTILE technology diploma scope and career opportunities
sustainability-14-14877-v2.pddhzftheheeeee
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Taming the Chaos: How to Turn Unstructured Data into Decisions
sbt 2.0: go big (Scala Days 2025 edition)
STKI Israel Market Study 2025 version august
Configure Apache Mutual Authentication
Zenith AI: Advanced Artificial Intelligence
Final SEM Unit 1 for mit wpu at pune .pptx
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
Developing a website for English-speaking practice to English as a foreign la...
Ad

python basic and advnacved easy tutorial.pptx

  • 1. PYTHON PROJECT Name-Aryan Raj SAP Id-500126035 Enrolment Number-R2142231925 School- School Of Computer Science Branch-Btech-CSE Batch-55 Submitted to-Mr Touseef Iqbal
  • 2. This code is about IPL ticket booking which is implemented in Python. It allows users to select a team, choose their ticket type, select a payment method, and then generates a ticket number for them This Python code simulates an IPL ticket booking system. It allows users to: 1.View a list of available teams. 2.Select a team to watch. 3.See the stadium where the match will be played. 4.Choose a ticket type (premium, vip, or basic) based on price information provided. 5.Select a payment method from available options (PhonePay, GooglePay, NetBanking). 6.Generate a random ticket number upon successful booking. The code includes functions for: -Displaying teams -Selecting a stadium based on chosen team -Selecting a ticket type with validation -Selecting a payment method with validation -Generating a random ticket number . Description About Code
  • 6. The provided code is a Python program for an IPL (Indian Premier League) Ticket Booking System. Let's break down the code and describe each component in detail. 1.Team and Stadium Information: The teams dictionary stores information about different IPL teams. Each team is represented by a key, and its corresponding value is another dictionary containing details such as the stadium where the team plays and the ticket prices for different categories (premium, VIP, basic). 2.Payment Methods: The payment_methods list stores the available payment methods for booking tickets. 3.Helper Functions: generate_ticket_number(): This function generates a random ticket number consisting of uppercase letters and digits. display_teams(): This function displays the list of IPL teams and prompts the user to select a team. select_stadium(team): This function takes a selected team as input and prompts the user to choose a ticket type (premium, VIP, basic) for the selected team's match. select_payment_method(): This function prompts the user to select a payment method from the available options. 4.Main Functionality: The main() function serves as the entry point of the program. It starts by displaying a welcome message and the list of IPL teams using the display_teams() function. It then prompts the user to select a team by entering the corresponding number.
  • 7. After selecting a team, it calls the select_stadium() function to choose the ticket type (premium, VIP, basic) for the selected team's match. Once the ticket type is selected, it displays the chosen ticket type and prompts the user to select a payment method using the select_payment_method() function. After selecting the payment method, it generates a random ticket number using the generate_ticket_number() function. Finally, it prints a confirmation message along with the generated ticket number. 5.Execution: The if __name__ == "__main__": block ensures that the main() function is executed when the script is run directly. 6.Improvement Suggestions: Error Handling: The code includes basic error handling for invalid inputs, but more comprehensive error handling could be implemented. User Experience Enhancement: Adding more user-friendly messages and a summary of booking details can improve the user experience. Modularization and Documentation: Further modularization and documentation can enhance code readability and maintainability. Consistency in Output: Ensuring consistency in the output format throughout the program can provide a better user experience. Overall, the provided code efficiently facilitates the booking of IPL tickets by guiding the user through the selection of teams, ticket types, and payment methods.