Infomatics Project Record - ASMA
Infomatics Project Record - ASMA
INFORMATICS PRACTICES
PROJECT FILE
Submitted for the partial fulfillment of AISSC
practical examination
DONE BY: ASMA OBRI
BONAFIDE CERTIFICATE
Certified to be the bonafide work done by Asma Obri of class
XII in the Informatics Practices during the academic year 2020-
2021.
o Easy to Code
o Object-Oriented Approach
o High-Level Language
o Highly Portable
2. Improved Productivity
Python is a very productive language. Due to the
simplicity of Python, developers can focus on solving
the problem.
They don’t need to spend too much time in
understanding the syntax or behaviour of the
programming language. You write less code and get
more things done.
3. Interpreted Language
Python is an interpreted language which means that
Python directly executes the code line by line. In case
of any error, it stops further execution and reports
back the error which has occurred.
Python shows only one error even if the program has
multiple errors. This makes debugging easier.
4. Dynamically Typed
Python doesn’t know the type of variable until we run
the code. It automatically assigns the data type during
execution. The programmer doesn’t need to worry
about declaring variables and their data types.
7. Portability
In many languages like C/C++, you need to change your
code to run the program on different platforms. That
is not the same with Python. You only write once and
run it anywhere. However, you should be careful not to
include any system-dependent features.
Disadvantages of Python
1. Slow Speed
We discussed above that Python is an interpreted
language and dynamically-typed language. The line by
line execution of code often leads to slow execution.
The dynamic nature of Python is also responsible for
the slow speed of Python because it has to do the
extra work while executing code. So, Python is not used
for purposes where speed is an important aspect of the
project.
4. Database Access
Programming in Python is easy and stress-free. But
when we are interacting with the database, it lacks
behind. The Python’s database access layer is primitive
and underdeveloped in comparison to the popular
technologies like JDBC and ODBC. Huge enterprises
need smooth interaction of complex legacy data and
Python is thus rarely used in enterprises.
5. Runtime Errors
As we know Python is a dynamically typed language so
the data type of a variable can change anytime. A
variable containing integer number may hold a string in
the future, which can lead to Runtime Errors.
Therefore Python programmers need to perform
thorough testing of the applications.
THEORY OF MYSQL
MySQL is an open-source relational database
management system (RDBMS). Its name is a
combination of "My", the name of co-founder Michael
Widenius's daughter, and "SQL", the abbreviation
for Structured Query Language.
MySQL is free and open-source software under the
terms of the GNU General Public License, and is also
available under a variety of proprietary licenses.
MySQL was owned and sponsored by
the Swedish company MySQL AB, which was bought
by Sun Microsystems (now Oracle Corporation). In
2010, when Oracle acquired Sun,
Widenius forked the open-source MySQL project to
create MariaDB.
MySQL is a component of the LAMP web
application software stack (and others), which is an
acronym for Linux, Apache, MySQL, Perl/PHP/Python.
MySQL is used by many database-driven web
applications, including Drupal, Joomla, phpBB,
and WordPress. MySQL is also used by many
popular websites,
including Facebook, Flickr, MediaWiki, Twitter,
and YouTube. MySQL is written in C and C++. Its SQL
parser is written in yacc, but it uses a home-
brewed lexical analyzer. MySQL works on many system
platforms, including AIX, BSDi, FreeBSD, HP-
UX, eComStation, i5/OS, IRIX, Linux, macOS,
Microsoft Windows, NetBSD, Novell
NetWare, OpenBSD, OpenSolaris, OS/2 Warp, QNX,
Oracle Solaris, Symbian, SunOS, SCO OpenServer,
SCO UnixWare, Sanos and Tru64. A port of MySQL
to OpenVMS also exists.
The MySQL server software itself and the client
libraries use dual-licensing distribution. They are
offered under GPL version 2, or a proprietary license.
Support can be obtained from the official manual. Free
support additionally is available in different IRC
channels and forums. Oracle offers paid support via its
MySQL Enterprise products. They differ in the scope
of services and in price. Additionally, a number of third
party organisations exist to provide support and
services, including MariaDB and Percona.
MySQL has received positive reviews, and reviewers
noticed it "performs extremely well in the average
case" and that the "developer interfaces are there,
and the documentation (not to mention feedback in the
real world via Web sites and the like) is very, very
good". It has also been tested to be a "fast, stable and
true multi-user, multi-threaded SQL database server".
Advantages of Using MySQL:
1. It’s Easy To Use
print ("do you want to purchase from above list :enter your choice :")
d=int (input ("enter your choice :"))
if (d==l) :
print ("you have ordered tea")
a=int (input ("enter quantity "))
s=lO·*a
print ("your amount for tea is :",s,"\n")
elif (d==2) :
print ("you have ordered coffee")
a=int (input ("enter quantity "))
s=lO*a
print ("your amount for coffee is :",s,"\n")
elif (d==3):
print ("you have ordered colddrink ")
a=int (input ("enter quantity ")J
s=20*a
print ("your amount for colddrink is :",s,"\n")
elif (d==4 ):
print ("you have ordered sandwich ")
a=int (input ("enter quantity"))
s=SO*a
print("your amount fop!' sandv;ich is :",s,"\n")
e:.:f (d==S):
print ("you have ordered noodles")
a=int(input ("enter quantity"))
s=SO*a
print("your amount for noodles is :",s,"\n")
e:se :
Print("please enter your choice from the menu")
def luggagebill ():
g2.oba:. z
print ("Do you want to see rate for luggage Enter 1 for yes :")
ch=int (input ("enter your choice :"))
2.f ch==l :
sql="select * from uggage"
mycursor.execute(sql)
rows=mycursor. fetchall ()
f0r x .:n rows :
print (x)
y=int (input("Enter Your weight of extra luggage->"))
z=y*lOOO
print (''your luggage bill :",z,''\n")