0% found this document useful (0 votes)
71 views11 pages

Python Marathon, 1-Month Challenge

The document outlines a 1-month Python marathon challenge by Infinity Skills Squad, focusing on the basics of Python programming and its applications in data analytics and game development. It covers the history, advantages, and installation of Python, along with practical implementations and comparisons with R. The course aims to equip learners with the skills to perform operations in Python and create a game by the end of the modules.

Uploaded by

student1074518
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views11 pages

Python Marathon, 1-Month Challenge

The document outlines a 1-month Python marathon challenge by Infinity Skills Squad, focusing on the basics of Python programming and its applications in data analytics and game development. It covers the history, advantages, and installation of Python, along with practical implementations and comparisons with R. The course aims to equip learners with the skills to perform operations in Python and create a game by the end of the modules.

Uploaded by

student1074518
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Python 🐍 Marathon, 1-Month Challenge

Module-1! {By ISS (INFINITY SKILLS SQUAD), follow our LinkedIn Page}

🐍 Course Overview:
Python is an easy tool to dig into oops programming language, why it’s so easy. It is
readable, flexible, fast & powerful. You can Python to integrate your data analytics
tasks with webapp or if statistics code needs to be incorporated into a production
database.
While the infancy of Python packages for data analysis was an issue in the past, which
has been improved significantly over the years and now the situation is completely
changed, guys. Python is one of the most popular and in trend languages rather than
other programming languages. It is as easy as kids using this to make their own
computer games. How fascinating it is.

→ Course Objects:
After mastering this course, you will be able to perform basic operations in Python,
even some at a more advanced level. At the end of the complete modules, we will also
teach you to make a wonderful game with the help of Python.

→ Let’s Plan Your Week-1, Learning Outcomes From The Module-1:

What & why Python, features+advantages


Installing Python
Interacting with Python (Python IDLE)
Python Shell/ CLI- Command Line Interaction/ Python Editor Window, working in
Script mode
Python V/s R

→ Few Textbooks That You Can Refer To:

Dr. R Nageswara Rao (Core Python Programming)


Kenneth A. Lambert (The Fundamentals Python)
Allen B. Downey (Think Python, O’Reilly, 2012

🐍 Quick Nutshell History of Python:


Python was created by “Guido Van Rossum”in 1989 at the “Centrum Wiskunde &
Informatica (CWI) in the Netherlands. It was officially released in 1991 as ”Python
0.9.0".

→ Why Python Was Created?


Guido Van Rossum wanted to develop a programming language that is:
✅ Easy to read and write, unlike complex languages like C & Perl.
✅ More productive with fewer lines of code
✅ Extensible & open source allowing contributions from the community.
✅ Powerful for general-purpose programming while being simple beginner friendly.

→ Influences Behind Python:


Python was inspired the “ABC’language which has also created at (CWI). However, ABC
had limitations so Guido wanted to fix it by making giving it a more practical aspects
into an extensible and scriptable language.

→ Key Milestones in Python Language:


1991, 1st Release- Python 0.9.0 officially released. Introduced classes, exceptions, and
core data types.
1994: Python 1.0 was released (added modules & functions).
2000: Python 2.0 released (Introduced list comprehension and garbage collection).
2008: Python 3.0 time (Major upgrade with unicode support, print function, etc.)
Present Time: Python is one of the most popular languages widely used in AI, web
development, automation, and data analytics/sciences.

→ Why is Python So Popular?

✅Easy to learn & use-simple English like writing English.


✅Versatile: Use in AIML, web development, data science, cybersecurity, and more.
✅Huge Community Support: Open-source with contributions.
✅Cross-Platform: Works on Windows, macOS, driving automation & innovation in
ML, web development, AI, etc.

🐍Journey Begins, Introduction:


→ What is Python? Python is an open-source object-oriented programming language

CTM: Python is based on “ABC language” & was inspired by the famous comedy
show “Monty Python’s Flying Circus”.

→ Advantages of Python: Because of the independency of platform, you can access this
language on any screen whether it is your Windows, LINUX, MACOS, UNIX ort etc.

Readability: Python is based on ABC language model that is why it is so easy to use,
very simple, and concise. Easy English instructions understandable even by the non-
programmers.
OOPS, Object Oriented Programming Language: It means a paradigm that organizes
software design around objects rather than functions & logic.
An Object is an instance of a class that contains data (attributes/properties & methods,
functions+behaviors that operate on the data.
Ample Availability of Libraries: It provides a larger warehouse of libraries to solve a
task.
Syntax Highlighting: It allows to distinguish between input, output and error
messages by different colors.

🐍Python V/s R🤔
Python & R, both are very popular especially among data scientists.
Proficiency in concepts is more than language choice.
® is a little better, if you are interested in inclining only towards analytics work.
If you need to write, broader programs Python is the best.

Installing Python - Ever since Python was first developed, it has become so popular
day by day among programmers.

Before we start working with Python. It needs to be installed on your systems. To install
Python, you must first download the installation package of the required version from
the link/URL- Python Release Python 3.11.4
https://www.python.org/downloads/release/python-3114/

→ IDE Or IDLE: There are a lot of Python (Integrated Development Environment)


PyCharm
Jupyter Notebook
Spyder
Tension not, it is possible to use Python without an IDE.
If you have RStudio, then Python is the closest.
You can use the Python shell in Interactive mode, Python editor in Script mode, and
Jupyter notebooks.
Python is an interactive window where you can type in Python code & get the output on
the same window. It is an interface between Python commands and the operating
system.
On opening, the Python shell shows a welcome message displaying its version and a
copyright notice. After this, the command prompt (>>> followed by a blinking cursor
gets displayed, shows that IDLE is now ready to take Python commands from the user.

Interactive Python Shell Interface

PTR! Point to remember, this is a Python shell, which is a part of Python IDE. The 3
greater than sign {>>> called the Prompt or Python Command Prompt, PCP}.

Learning Tips!
Python shell displays the prompt “>>>” indicates that it is waiting for the user
command to be entered.
Communication of ideas is easiest with Jupyter. To get access to this, we will use
Anaconda.
🐍 Getting started with Practical Implementations:
#1 We first begin with a very simple one.

>>> print (“Hello Infinity”)

Hello Infinity

>>> print (“Welcome to the Python Programming”)

Welcome to the Python programming

>>>

In the above case scenarios, we have included two print() statements to display two
different messages upon pressing the ENTER key.
It has now become evident that we can issue commands at the primary prompt and
obtain immediate results. Print () statement without any arguments will simply jump to
the next line.

→ Python is A Case-Sensitive language:

This means that Python differentiates between capital and small letters.
Eg: Print P, capital and print p small are 2 different things in Python.

>>> print (“Hello World”)

Hello World

>>> Print (“Hello World”), remember (P) is capital here

>>> Traceback (most recent call last): file “<pyshell#2>”, line 1 in <module>

Print (“Hello World”), NameError: name ‘Print’is not defined


>>>

You guys must remember while using the print () command, the message or the argument
must be displayed within the quotation marks (single ‘’or double “”) then only the argument
is displayed as it is.

#Practical Implementation 2:

Using IDLE as a calculator just like text/string messages we have given so far.
We can also perform mathematical calculations here suing the Python command prompt
same like a calculator.

>>> 5+8

13

>>> print (10+5)

14

In the above entered statements, we have performed mathematical calculations using


print statements () as well as by directly typing the commands without the use of print
() that’s the benefit of working on Python.

→ PTR! (point-to-remember) To repeat a command in IDLE. Press ‘ALT+P’ in order to


save time and typing effort.

Consecutive arguments are separated by the commas , in print functions (). When
print() is executed the values of consecutive arguments will be separated by spaces
between them. So, we can say that the space is the default separator of values in the
output. We can also specify some other strings as a separator using the separate
argument of print () function.

#3 Practical Implementation, Syntax of a Print Function:


print (value,...sep=’’, end = \n, file=sys.st out)
sep: String inserted b/w values & default space.
end: String appended after the last value, default a new line.

Here in first line space is the default separator.


In 2nd line separator is this ‘*’star
In 3rd line the separator is ‘-*-’
If we are using sep.., argument to specify the separator, then it must be specified after
all the values to be printed. Otherwise the interpreter shows a syntax error. A piece of
an example is given below:

#4 Practical Implementation, Ending Parameter with Print():

Python print () function comes with a parameter called ‘end’. By default the value of
this parameter is ‘\n’, i.e., the new line character/string. You can end a print statement
with any character/string using this parameter.
The print function is in this uses sep., argument to separate the arguments & end after
the lost arguments.
Eg: Type the following statements using ‘end’parameter with the ‘print () function’.
🐍 More About Python Shell:
→ The Python shell window has the following menu items:

File, edit, shell, debug, options, windows & help.


The edit menu allows you to edit the text you type in the shell mode by applying a
variety of options, some of which are: Undo, Redo, Cut, Copy, Select All, Paste, Find,
and Replace.
The shell and debug menu are useful when creating larger programs. The shell menu
allows you to restart the shell or search the shell’s log to trace the most recent reset. - –
The debug menu provides useful menu items for debugging the program in order to
trace the errors. While checking for line-by-line executions.
The option menu allows the user to configure IDLE according to the suitable and
perfect working requirements.

→ Python Editor Window, Working in Script Mode:

Till now, we have been working on Python’s interactive mode, where there is no
provision to hold or save the commands that we type on the Python prompt.
All the written commands are removed automatically as soon as we close the shell mode.
But in interactive script mode, this problem is solved. This switchover is controlled by
the Python shell itself.
The file windows option provides a variety of options to create a new file, open an
existing file, or open a module. Save the current module session. When you click on the
new file option, a new window or Python editor option will be available.
Python Script mode is a very simple & standard text editor where you can type or edit
the code. At the time of its opening, the file window is named ‘untitled’ by default. The
name can be changed by the user end for the remaining file.
Our next step is to save this file by clicking on the “file menu”
To execute a Python Script file, you have to click on the run module or simply press the
F5 button/key on your keyboard.
PTR! (point-to-remember) While working on the script mode, when you enter the
statements to be executed and press Enter Key. You won’t automatically see the
results the way you could see, while working in the interactive mode. To see the
output or result in the script mode we have to run or invoke the particular statement.

🐍Exiting Python:
To get a safe & loving memorable exit from Python, click {Ctrl+Z} on your keyboard
or simply type ‘Quit/Exit’.

→ PTR! (point-to-remember) If in case exit or quit doesn’t work then as an alternative


of this you can type the following commands:

{import sys; sys. exit ()} & you’ll be free 🙂


JOIN OUR INFINITY-COMMUNITY ON WHATSAPP TOO FOR LATEST, TIMELY
♾️
INSIGHTFUL INSIGHTS!

→ ♾️ Technology Warriors 🥷 #WeBelieveWeCan ✊️✨️


Infinity

→ Infinity Technology Warriors Announcement 📰 #MainGroup 🚀

SCAN ME👇

You might also like