0% found this document useful (0 votes)
5 views7 pages

Python Programming Basics and Setup Guide

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

Python Programming Basics and Setup Guide

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

Python programming

Python Programming is a multipurpose easy


language. It can be use for different purposes such
as:
[Link] Data analysis
[Link] Learning and AI (Game)
[Link] and App Design such as: Youtube,
Instagram, and Dropbox are all powered by
python.

How to install and work on Python

Step 1: Download latest version of python by


visiting [Link] (version 3.9.2 ) .
Step 2: Double click on the icon and download.
Step 3: Install python and add python to path.

Check python version download


Go to python command prompt
Type python and enter

Intergrated Development Environment (IDE)

IDE for pychram is a software application that


provides a comprehensive set of tools and
features to stream time of python software
development. E.g pychram, visual studio code
It combines various functions into a simple
interface for increasing developer productivity
and efficiency

Component

[Link] editor – for writing and editing python


code e.g syntax highlighting, code
completion.
[Link] - tools alt allows developer to step
through their code line by line, examine
variables and identify and fix errors (bugs)

Use text editor (Notepad)

Print (“hello world”) file


Save as hello world extension
Save to desktop
Go to command prompt type in python space
drag down from desktop and press enter

How to get and use pychram

Step 1: Install code [Link] ( popular


python code editor ) use to write codes and
execute.
Step 2: Get Pychram from
[Link]/pychram

Step 3: Click on download. There are 2 editions


of pychram, which are:
[Link] / not free
b. Community (free and open for user)

Step 4: To download folder, click on


installation wizard on window and open it.

Step 5: First time users need to configure


pychram. Click on skip remaining and set to
default

Step 6: Click on create New project, add


project name to the extension location such
as hello world to path (where python files will
be saved)

Step7: Click on create VENU (virtual


environment new python file). Right click on
Project name (hello world)

Visual studio code

Python VSC by Microsoft is for free)


To Download
Visual. [Link] (Window download)
Select add task
Then select all information and finish.
Welcome screen appears
Click on left extension
Python. Extension
Download or install.
Using keyboard: click ctrl-shift-p
Select interpreter
Select python as interpreter
Click on file, select open
Click on previous file helloworld and select

Code using
[Link] (strings)
Type print (“what’s up”) click on run /play or press
enter
Reply will be what’s up
[Link] to explain a code
Comment is use when writing lot of code in
order to explain each code. The symbol for
comment is #. This must start any comment
statement e.g
#Print some text
print (“what’s up”)
enter
Note:comment symbol should not inserted
before the code. If does no reply / reponse will
return

Reply: what’s up

[Link] rule
PEMDAS (BODMAS rule for python and symbol)
P= Please (Parenthesis)
E= Excuse (Exponential **)
M= My (Multiplication *)
D= Dear (Division /)
A= Aunty (Addition +)
S= Sade (Subtraction -)

Note your start symbol in python is print


[Link]
Rules of variables
I. Must contain letters, numbers or underscores
II. Should not start with numbers
III. Spaces are not allowed
IV. Cannot be key words (e. g break, try)
V. Short & descriptive are best
VI. Case sensitive
Variables
Red bucket=kelvin
Name major to as string
Red bucket=8 number

Create variables
Red_bucket = “Kelvin”
Enter
Print (red_bucket) play icon
Copy text line and paste into 2nd line
Assign 10
Red_bucket=10
Delete
Del red_bucket
Print(red_bucket)
Allow input request
Red_bucket = input(“what you want to put in
bucket”)
Print (red_bucket)
Share
Conditional (True/False)
Print(“5==4”) checking(==)
False
Symbol Operation Example
== Equal to 2==2
True
!= Not equal to 4!=4
False
< Less than 3<5
True
> Greater than 3>5
False
>= Greater than or 2>=3
equal to False
<= Less than or 3<=5 True
equal to

You might also like