



















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
sip report on fantasy cricket game on internshala
Typology: Papers
1 / 59
This page cannot be seen from the preview
Don't miss anything!
By
Enrollment No. A
Department of Computer Science and Engineering Amity School of Engineering and Technology Amity University Madhya Pradesh, Gwalior DECLARATION
Date: 21/11/2021 Rishabh Bansal
ACKNOWLEDGEMENT
Rishabh Bansal
ABSTRACT
1.1 Python.............................................................................................................................................. 1.2 Scripting Language........................................................................................................................... 1.3 Object Oriented Programming.......................................................................................................... 1.4 History of python.............................................................................................................................. 1.5 Behind the Scene of Python.............................................................................................................. Downloading & Installing Python 2.1 Downloading Python........................................................................................................................ 2.2 Installing Python 2.3 Setup path of variable 2.4 Running The Python IDE.................................................................................................................. 2.5 Python code Execution...................................................................................................................... Data Types & Operator 3.1 Data Type......................................................................................................................................... 3.2 Variables.......................................................................................................................................... 3.3 String................................................................................................................................................. 3.4 Python Operator................................................................................................................................ 3.4.1 Arithmetic Operator..........................................................................................................
3.4.2 Comparison Operator....................................................................................................... Tuple & List 4.1 Tuple........................................................................................................................................ 4.1.1 Accessing Tuple Values........................................................................................................ 4.1.2 Built in Operation................................................................................................................... 4.1.3 Built in Touple Functions....................................................................................................... 4.2 List........................................................................................................................................... 4.2.1 Accessing List Values.................................................................................................... 4.2.2 Built in Operation.......................................................................................................... 4.2.3 Built in Functions......................................................................................................... Loops & Conditional Statements 5.1 Loops..................................................................................................................................... 5.1.1 Loops Definition.................................................................................................... 5.1.2 Loops Example...................................................................................................... 5.2 Conditional Statement............................................................................................................ 5.21Conditional Statement Definition............................................................................ 5.2.2 Conditional Statement Example........................................................................... 5.3 Function................................................................................................................................ 5.3.1 Syntax & Examples................................................................................................ Uses & Scope of python. 6.1 What can we do With Python?............................................................................... 6.2 Who Uses Python Today?......................................................................................
Python Python is a widely used high-level, general-purpose, dynamic programming language that is interpreted. Its design philosophy prioritises readability, and its syntax enables programmers to express concepts in fewer lines of code than in languages like C++ or Java. The language includes constructs that make it possible to write clear programmes on a small and large scale. Python supports a variety of programming paradigms, such as object-oriented, imperative, functional, and procedural programming. It offers a big and extensive standard library, as well as a dynamic type system and intelligent memory management. Python interpreters can be installed on a variety of operating systems, allowing Python code to run on a range of platforms. Scripting Language A scripting language, often known as a scripting language, is a programming language that supports scripts, which are programmes created for an unique run-time environment that automate the execution of operations that would otherwise be performed one at a time by a human operator. Scripting languages are frequently translated (rather than compiled).Primitives are often simple actions or API calls that can be integrated into more complicated programmes using the language.Software programmes, web pages within a web browser, the shells of operating systems (OS), embedded devices, and a variety of games are all examples of environments that can be automated using scripting. A scripting language is a domain-specific script for a certain environment; when scripting an application, this is often referred to as an extension language.Scripting languages are also known as very high-level programming languages or control languages since they work at a high degree of abstraction.. 2
Object Oriented Programming Language Object-oriented programming (OOP) is a programming paradigm based on the notion of "objects," which can have both data and code in the form of fields and procedures, which are referred to as attributes and methods, respectively. A distinguishing feature of objects is that their procedures can access and often alter the data fields of the object with which they are related (objects have a notion of "this" or "self"). Computer programmes are developed in OO programming by constructing them out of objects that interact with one another. Although object-oriented programming is diverse, the majority of popular languages are class-based, which means that objects are instances of classes, which defines their type. History Python was developed in the late 1980s, and its development began in December 1989 at CWI in the Netherlands by Guido van Rossum as a replacement to the ABC language (which was influenced by SETL) that could handle exceptions and interface with the Amoeba operating system. Van Rossum is Python's primary author, and the Python community has given him the moniker of "benevolent dictator for life" to highlight his continued prominent role in determining Python's path (BDFL) 3
You'll be led to a page with an explanation of all the new upgrades and features in 3.4.1 after you click that, but you can always read it while the download is in progress. Scroll to the bottom of the page until you reach the "Download" area, then click the "download page" link. Now go down to the bottom of the page and look for the "Windows x86 MSI installer." If you'd want to download the 86-64 bit MSI, go ahead.We feel that the 86-bit MSI is superior than the 64-bit MSI, even if you have a 64-bit operating system installed on your PC. This is mentioned this because it will still run OK, and some built binaries and Python libraries don't function well with 64-bit platforms. 5
Installing Python After downloading the Python MSI, just go to the download folder on your computer, double-click the file, and then hit Run when the dialogue box appears. Leave the "Install for all users" option selected if you are the only one who uses your computer. If you have numerous accounts on your computer and don't want it to be installed on all of them, choose "Install just for me" and then "Next."
Setup the Path Variable Start by entering "environment" into the start menu and selecting the option "Edit the system environment variables."When the "System Properties" box displays, choose "Environment Variables..." from the drop-down menu.Focus on the bottom part of the "Environmental Variables" window once it's open. You'll note that it has control over all of the "System Variables," not just the ones related to your user.To create a new Python variable, choose "New...". 8
Simply give your Path a name and the code displayed below. Because we're using Python 2.7.3 in this example, we'll refer to the path as "Pythonpath.""C:Python27;C:Python27Scripts;" is the string you'll need to type in. 9
Python Code Execution The typical runtime execution mechanism for Python is as follows: source code is converted to byte code, which is then executed by the Python Virtual Machine. Your code is compile automatically, but it is then interpreted. Source code extension is .py Byte code extension is .pyc (compiled python code) 11
Data Type (This is referred to as dynamic typing.) Data types decide whether or not an object can perform a task or if it would be illogical to do so. Other programming languages frequently determine if an action is appropriate for an object by ensuring that the item can never be stored at a location where the operation will be performed on it (this type system is called static typing).That is not something Python can accomplish. Instead, it saves the type of an object with the object and evaluates whether the operation makes sense for that object when it is executed. Python has many native data types. Here are the important ones: Booleans are either True or False. Numbers can be integers (1 and 2), floats (1.1 and 1.2), fractions (1/2 and 2/3), or even complex numbers. Strings are sequences of Unicode characters, e.g. an HTML document. Bytes and byte arrays , e.g. a JPEG image file. Lists are ordered sequences of values. Tuples are ordered, immutable sequences of values. Sets are unordered bags of values. 12