Ultimate Python Tutorial For Beginners
shalomtash
Posted on April 22, 2022
INTRODUCTION TO PYTHON
Python is one of the high level programming languages just like Java. A high level programming language means it is closer to the human language e.g., print('hello world!')
.
So as to understand what python is with less time wastage, I have outlined various key concepts to read about such include;
Variables
Operators
Data Types
Conditions
Loops
Exception Handling
Lists
Dictionary
String Operations
File Operations
VARIABLES
-This are whole numbers [0,1,2,3,4,5,6,7,8,9]
.
DATA TYPES
-Data types are the classification or categorization of knowledge items. This represents the type useful to be performed for a specific data.
There are 4 data types. This includes:
string - This are alphabetic letters
str('a', 'b', 'c', 'd')
.Boolean(bool) - This are
True
orFalse
statements. They can even be represented using0
to meanFalse
and1
to meanTrue
.
3.Float - This are decimal numbers. e.g., 0.12
.
4.Complex - This is a building function in python which is rarely used . Complex number(real number + the imaginary number)
.
LOOPS
Loop is iterable object such as a list, tuple, set etc.
CONDITIONS
They are statements that are used to show if a statement is true or not true . e.g., if... else
.
STRING OPERATIONS
They are special string operators .
example
*
its used to concatenate multiple copies of the same string .
[]
they give a character of the same index .
[:]
it gives character from a given range .
LISTS
They are used to store multiple items in a single variable. e.g., grocery = ['kales', 'tomatoes', 'onions']
.
FILE OPERATIONS
They are inbuilt functions
e.g.,
r
used to open a file for reading .
Posted on April 22, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.