You are on page 1of 27

THE NEW INDIAN SCHOOL W.L.L.

KINGDOM OF BAHRAIN

INFORMATIC
S PRACTICES
PROJECT

RELATION BETWEEN
PYTHON AND CSV

NAME : LEANDER CHRIS D’SOUZA

CLASS & SEC : XII C


YEAR : 2020 - 2021
THE NEW INDIAN SCHOOL W.L.L.
KINGDOM OF BAHRAIN

Certificate of Completion

Senior Secondary School


Affiliated to CBSE, New Delhi

This is to certify that LEANDER CHRIS D’SOUZA of class

XII-C has successfully completed INFORMATICS PRACTICES

Project on the topic ‘RELATION BETWEEN PYTHON AND CSV’

for the academic year 2020-2021 .

Internal Examiner External Examiner

School Seal:

ACKNOWLEDGMENT
I would like to express my special thanks of gratitude to my teacher
Mrs Ruby Paul who gave me the golden opportunity to do this
wonderful Informatics Practices project on the topic ‘Relationship
between Python and CSV(Comma Separated Values)’ in which I
choose to do ‘How to prepare an Inflight meal receipt for low cost
flights’ ,which also helped me in doing a lot of Research based on
inflight meals and other aviation factors and I came to know about so
many new things. I am really thankful to her or teaching me a lot of
test programs which helped me to do the project.

Secondly, I would also like to sincerely thank my parents and friends


who helped me a lot in finalizing this project during the summer
vacation.

Index
1. Introduction to Python

2. Introduction to Interface Python with CSV

3. About Project

4. Hierarchical Diagram of the Project

5. Hardware and Software requirement

6. Source Code

7. Output Screens

8. Bibliography

1. Introduction to Python
Python is an easy-to-learn yet powerful object oriented programming language. It is a very
high level programming language yet as powerful as many other middle-level not so high
level languages like C, C++, Java etc.
Python in other words is an interpreted as well as an expressive language. It is well known
for its completeness and also for being a cross-platform language. It is a free and open source
and can be used for:
 Scripting
 Web Applications
 Game Development
 System Administration
 Rapid Prototyping
 GUI Programs
 Database Applications
But, Python is not the fastest language and has less libraries than C, Java, Perl. It is not strong
on Type-binding and not easily convertible .

2. Introduction to Interface Python with CSV


CSV stands for “comma-separated values,” and CSV files are simplified spreadsheets
stored as plaintext files. Python’s csv module makes it easy to parse CSV files.
Each line in a CSV file represents a row in the spreadsheet, and commas separate the
cells in the row.
The advantage of CSV files is simplicity. CSV files are widely supported by many types
of programs, can be viewed in text editors (including IDLE’s file editor), and are a
straightforward way to represent spreadsheet data. The CSV format is exactly as
advertised: It’s just a text file of comma-separated values.
To read data from a CSV file with the csv module, you need to create a Reader object.
A Reader object lets you iterate over lines in the CSV file.

3. About Project
The project discussed here is about how to prepare an inflight meal receipt for all the low
cost flights like IndiGo, SpiceJet, Air Arabia, Go Air and many others.
A receipt is a written acknowledgment that something of value has been
transferred from one party to another. In addition to the receipts consumers
typically receive from vendors and service providers, receipts are also issued
in business-to-business dealings as well as stock market transactions. For
example, the holder of a futures contract is generally given a delivery
instrument, which acts as a receipt in that it can be exchanged for the
underlying asset when the futures contract expires.
In addition to showing ownership, receipts are important for other reasons. For instance,
many retailers insist that a customer must show a receipt to exchange or return items while
others demand that a receipt—generally issued within a certain timeframe—be produced for
product warranty purposes. Receipts can also be important for taxes because the IRS requires
documentation of certain expenses. The Internal Revenue Service (IRS) suggests that the
following types of receipts if generated, be retained by small businesses:

 Gross receipts such as cash register tapes, deposit information (cash and credit sales),
receipt books, invoices, forms 1099-MISC
 Receipts from purchases and raw materials (These should show the amount paid and
confirm that they were necessary business purchases; documents could include
canceled checks or other documents that identify the payee, amount, and proof of
payment/electronic fund transfers.)
 Cash register tape receipts
 Credit card receipts and statements
 Invoices
 Petty cash slips for small cash payments

A low-cost carrier or low-cost airline is occasionally referred to an an airline that is


operated with an especially high emphasis on minimizing operating costs and without some
of the traditional services and amenities provided in the fare, resulting in lower fares and
fewer comforts. To make up for revenue lost in decreased ticket prices, the airline may
charge extra fees – such as for carry-on baggage.
The term originated within the airline industry referring to airlines with a lower operating
cost structure than their competitors. While the term is often applied to any carrier with low
ticket prices and limited services, regardless of their operating models, low-cost carriers
should not be confused with regional airlines that operate short flights without service, or
with full-service airlines offering some reduced fares.
Some airlines actively advertise themselves as low-cost, budget, or discount airlines while
maintaining products usually associated with traditional mainline carrier's services—which
can increase operational complexity. These products include preferred or assigned seating,
catering other items rather than basic beverages, differentiated premium cabins, satellite or
ground-based Wi-Fi internet, and in-flight audio and video entertainment. More recently, the
term "ultra low-cost carrier" differentiates some low-cost carriers, particularly in North
America where traditional airlines increasingly offer a similar service model to low-cost
carriers.
The pricing policy of the low-cost carriers is usually very dynamic, with discounts and
tickets in promotion. Like other carriers, even if the advertised price may be very low, it
often does not include charges and taxes. With some airlines, some flights are advertised as
free (plus applicable taxes, fees and charges). Depending on the airline, perhaps as many (or
as few) as ten percent of the seats on any flight are offered at the lowest price and are the first
to sell. The prices steadily rise thereafter to a point where they can be comparable or more
expensive than a flight on a full-service carrier.
Most airlines charge additional taxes and fees on their tickets. Some low-cost airlines have
been known to charge fees for the seemingly ridiculous, such as levying a credit card charge
if credit card is the only payment method accepted. Many consumers and legislative bodies
consider this to be fraudulent, but some still allow it and similar practices.
Traditional perceptions of the "low-cost carrier" as a stripped-down, no-frills airline have
been changing as new entrants to the market offer passengers more options, as well as
premium amenities.
An airline meal, airline food, or in-flight meal is a meal served to passengers on board a
commercial airliner. These meals are prepared by specialist airline catering services and
normally served to passengers using an airline service trolley. These meals vary widely in
quality and quantity across different airline companies and classes of travel. They range from
a simple snack or beverage in short-haul economy class to a seven-course gourmet meal in
a first class long-haul flight. The types of food offered also vary widely from country to
country, and often incorporate elements of local cuisine, sometimes both from the origin and
destination countries. When ticket prices were regulated in the American domestic market,
food was the primary means airlines differentiated themselves.
The type of food varies depending upon the airline company and class of travel. Meals may
be served on one tray or in multiple courses with no tray and with a tablecloth, metal cutlery,
and glassware (generally in first and business classes). Often the food is reflective of the
culture of the country the airline is based in or the country that the airplane is destined for
(e.g. Indian, Japanese, Chinese, or Western meals).
The airline dinner typically includes meat (most commonly chicken or beef), fish, or pasta;
a salad or vegetable; a small bread roll (with butter); and
a dessert. Condiments (typically salt, pepper, and sugar) are supplied in
small sachets or shakers.
Caterers usually produce alternative meals for passengers with restrictive diets. These must
usually be ordered at least 24 hours in advance, sometimes when buying the ticket. Some of
the more common examples include: Cultural diets, such
as Turkish, French, Italian, Chinese, Japanese, Korean, or Indian style. Infant and baby
meals. Some airlines also offer children's meals, containing foods that children will enjoy
such as baked beans, mini-hamburgers, and hot dogs. Medical diets, including low/high fiber,
low fat/cholesterol, diabetic, peanut free, non-lactose, low salt/sodium, low-purine, low-
calorie, low-protein, bland (non-spicy), and gluten-free meals. Religious diets,
including kosher, halal, and Hindu, Buddhist, and Jain vegetarian. Vegetarian meals,
typically further defined as either lacto-ovo or vegan meals. These meals may follow a
particular cuisine such as Asian cuisine or Western cuisine.
Food on board a flight is usually free on full-service Asian airlines and on almost all long-
distance flights, while they might cost extra on low-cost airlines or European full-service
airline flights. Quality may also fluctuate due to shifts in the economics of the airline
industry.
On long-haul international flights in first class and business class, most Asian and European
airlines serve gourmet meals, while legacy carriers based in the US tend to serve multicourse
meals including a cocktail snack, appetizer, soup, salad, entrée (chicken, beef, fish, or pasta),
cheeses with fruit, and ice cream. Some long-haul flights in first and business class offer such
delicacies as caviar, champagne, and sorbet (intermezzo).
The cost and availability of meals on US airlines has changed considerably in recent years, as
financial pressures have forced some airlines to either begin charging for meals, or abandon
them altogether in favor of small snacks, as in the case of Southwest Airlines. Eliminating
free pretzels saved Northwest $2 million annually. Nowadays, the main US legacy carriers
(American, Delta, and United) have discontinued full meal service in economy class on
short-haul US domestic and North American flights, while retaining it on most
intercontinental routes and at least one European carrier, Icelandair, follows this policy on
intercontinental runs as well.
As of 2018, all 4 major U.S. legacy airlines now offer free snacks on board in economy class.
United Airlines re-introduced free snacks in February 2016. From April 2016, American
Airlines fully restored free snacks on all domestic flights in economy class. Free meals will
also be available on certain domestic routes. Delta and Southwest have already been offering
free snacks for years.
Air China has reported that each domestic flight's meal requires RMB50 (US$7.30) while
international flights require RMB70 (US$10). However, this figure varies from airline to
airline, as some have reported costs to be as low as US$3.50.Air China is also minimizing
costs by loading only 95% of all meals to reduce leftovers and storing non-perishable foods
for emergencies.
In 1958 Pan Am and several European airlines entered into a legal dispute over whether
certain airline food sandwiches counted as a "meal".

Frequently Asked Question(From Air India Express):-


Can I pre-book my meal before departure?

You can pre-book your on-board meal 24 hours prior to the departure of your flight.

We offer a varied range of mouth-watering delicacies to satisfy your hunger pangs. You can
book your meals from our ‘Express Café’ option under ‘Express Extras’ by simply selecting
it from our web menu during the booking process or anytime later by using the ‘Manage my
Booking’ option on www.airindiaexpress.in and purchase the same. The Selected Meal is in
lieu of the Complimentary Meal. The special meals have been priced after discounting the
cost of the Complimentary Meal.

Note: Meals will be served along with Bottled Water & Tea/Coffee.

*Currently this is offered in most of the flights in India, select flights from Dubai, Muscat,
Doha, Ras Al Khaimah, Al Ain, Kuwait, Bahrain, Damam and Riyadh.
LOW COST CARRIER IMAGES:-
4. Hierarchical Diagram of the Project

Import

random.ran
Input
dint

datetime,
read_csv
date
5. Hardware and Software requirement

Hardware:-
Laptop
Wireless Mouse
Software:-
Google
Python 3.7.4(For testing programs only)
Python(Anaconda Version – Jupyter Notebook)
Microsoft Tools(2013) – Word and Excel
Snipping Tool
Paint3D
6. Source Code
Procedure for how to write the code:-
1. Perform the import function. Create a dataframe containing all the letters for the
seatnumber. Name the column as ‘FlightSEATS’ with indices as [‘’, ‘N/A’, ‘N/A’ ………..]

2. Create a form named fdata using input() which includes welcome note as per the airline
you have chosen to travel with, the display of meals(by creating a CSV table where it
includes meals, category and prices of your choice), meal chosen by the passenger, the
category of meal, name of the passenger, class of the passenger, origin and destination.

3. Collect the remaining details left out. These would be included in the food receipt of the
passenger. The sequence and the e-tkt number is to be provided by the company only.
4. Prepare the food receipt of the passenger as given below.
7. Output Screens
1. Form needs to be filled up first:-
(a)

(b)

(c)
(d)

(e)
(f)

(g)
2) Food receipt is prepared after entering the details of the passenger.
3) Using Snipping tool press “Edit with Paint 3D” for decoration purpose.
4) Finally, the receipt is now ready.
8. Bibliography:-

Wikipedia

Informatics Practices – Class XI(Sumita Arora)

Informatics Practices – Class XII(Sumita Arora, Preeti Arora)

https://www.airindiaexpress.in/en/faqs/faqs
GALLERY(SAMPLES OF INFLIGHT MEAL RECEIPTS)

You might also like