Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

THE EASY WAY TO LEARN PYTHON PROGRAMMING

Rating
-
Sold
-
Pages
40
Uploaded on
27-02-2023
Written in
2022/2023

In 100 days of code, we are going to learn Python programming From zero to job ready. Python is a dynamically typed Object oriented programming language. We are trying to tell computers what to do ? And we do it with the help of programming. According to me Python is the easiest learned programming language. There are many more programming languages in market. But this course is going to be dedicated to Python. And this is because Python is very easy. Python is Dynamically typed. General purpose programming language which support object oriented paradigm. It also supports functional approach. After that you start doing things , Then you have fun at a different level. Installing Python in local is also very easy.

Show more Read less
Institution
Course

Content preview

Introduction to programming in Python | Python
Tutorial - Day #1
Programming With Chinmay

In 100 days of code, we are going to learn Python programming From zero to job
ready. Python is a dynamically typed Object oriented programming language.
Guido van Russom was watching a show named Monty Python 's Circus On TV
when he was working on this language. He thought why not name it as Python. And
since then its name is Python. We are trying to tell computers what to do ? And we
do it with the help of programming. According to me Python is the easiest learned
programming language. There are many more programming languages in market.
But this course is going to be dedicated to Python. And this is because Python is
very easy. Python is Dynamically typed. General purpose programming language
which support object oriented paradigm. It also supports functional approach. After
that you start doing things , Then you have fun at a different level.

Installing Python in local is also very easy.

Installing Python on Windows takes a series of few easy steps.

Step 1 − Select Version of Python to Install
Python has various versions available with differences between the syntax and working
of different versions of the language. We need to choose the version which we want to
use or need. There are different versions of Python 2 and Python 3 available.

Step 2 − Download Python Executable Installer
On the web browser, in the official site of python (www.python.org), move to the
Download for Windows section.
All the available versions of Python will be listed. Select the version required by you
and click on Download. Let suppose, we chose the Python 3.9.1 version.




On clicking download, various available executable installers shall be visible with
different operating system specifications. Choose the installer which suits your system

,operating system and download the instlaller. Let suppose, we select the Windows
installer(64 bits).
The download size is less than 30MB.

Step 3 − Run Executable Installer
We downloaded the Python 3.9.1 Windows 64 bit installer.
Run the installer. Make sure to select both the checkboxes at the bottom and then click
Install New.
On clicking the Install Now, The installation process starts.
The installation process will take few minutes to complete.

Step 4 − Verify Python is installed on Windows
To ensure if Python is succesfully installed on your system. Follow the given steps −
 Open the command prompt.
 Type ‘python’ and press enter.
 The version of the python which you have installed will be displayed if the python
is successfully installed on your windows.

Step 5 − Verify Pip was installed
Pip is a powerful package management system for Python software packages. Thus,
make sure that you have it installed.
To verify if pip was installed, follow the given steps −
 Open the command prompt.
 Enter pip –V to check if pip was installed.
 The following output appears if pip is installed successfully.


We have successfully installed python and pip on our Windows system.


Python Quickstart
Python is an interpreted programming language, this means that as a developer
you write Python (.py) files in a text editor and then put those files into the
python interpreter to be executed.

The way to run a python file is like this on the command line:

C:\Users\Your Name>python helloworld.py

Where "helloworld.py" is the name of your python file.

Let's write our first Python file, called helloworld.py, which can be done in any
text editor.

,helloworld.py

print("Hello, World!")
Try it Yourself »

Simple as that. Save your file. Open your command line, navigate to the
directory where you saved your file, and run:

C:\Users\Your Name>python helloworld.py

The output should read:

Hello, World!

Congratulations, you have written and executed your first Python program.

Whenever you are done in the python command line, you can simply type the
following to quit the python command line interface:

exit()


Python Variables
In Python, variables are created when you assign a value to it:

x=5

y = "Hello, World!"

print(x)

print(y)


Comments
Python has commenting capability for the purpose of in-code documentation.

Comments start with a #, and Python will render the rest of the line as a
comment:


Example
Comments in Python:

#This is a comment.
print("Hello, World!")



Casting

, If you want to specify the data type of a variable, this can be done with casting.


Example
x = str(3) # x will be '3'
y = int(3) # y will be 3
z = float(3) # z will be 3.0


Get the Type
You can get the data type of a variable with the type() function.


Example
x = 5
y = "John"
print(type(x))
print(type(y))


Many Values to Multiple Variables
Python allows you to assign values to multiple variables in one line:


Example
x, y, z = "Orange", "Banana", "Cherry"
print(x)
print(y)
print(z)


Unpack a Collection
If you have a collection of values in a list, tuple etc. Python allows you to
extract the values into variables. This is called unpacking.


Example
Unpack a list:

fruits = ["apple", "banana", "cherry"]
x, y, z = fruits
print(x)
print(y)
print(z)


Global Variables
Variables that are created outside of a function (as in all of the examples above)
are known as global variables.

Written for

Course

Document information

Uploaded on
February 27, 2023
Number of pages
40
Written in
2022/2023
Type
Class notes
Professor(s)
Chinmay
Contains
All classes

Subjects

$27.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
chinmaykumar

Get to know the seller

Seller avatar
chinmaykumar CAPGEMINI
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions