Python Marathon, 1-Month Challenge
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.
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/
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.
Hello Infinity
>>>
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.
This means that Python differentiates between capital and small letters.
Eg: Print P, capital and print p small are 2 different things in Python.
Hello World
>>> Traceback (most recent call last): file “<pyshell#2>”, line 1 in <module>
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
14
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.
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:
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’.
SCAN ME👇