** WHAT IS PYTHON**
First released in 1991 and created by Guido van Rossum, python is an interpreted, high-level and general-purpose programming language.
GETTING STARTED
Python Installation
You can download the various versions of python through your preferred browser(preferred versions 3.6+).
Clicking on download will download python.
Click on the..exe file to set up python in your computer
Writing the First Code
Open the Command Prompt and type python
You will be able to access Python.
print(Hello World)
FUNDAMENTALS OF PYTHON
Here we get to know Python;
Variables
Strings and Comments
Operators
Lists
Dictionaries
Sets
Functions
Variables
A variable is a storage location (Identified by the memory adress) paired with an associated symbolic name(an identifier), which contains some known or unknown quantity of information refered to as a value.
name= eric
age= 19
name and age are variables
Strings and Comments
#
is used to convert a string to a comment
print("hello world")
#print ("Hello world")
Operators
There are different types of operators
Boolean
Boolean values are two which areTrue
orFalse
Comprison
Comparison operators are
- Equal (
==
) - Not equal (
!=
) - Greater than (
>
) - Less than (
<
) - Greater or equal to (
>=
) - Less than or equal to (
<=
) - Logical
and
or
not
Lists
In lists, characters are enclosed in brackets [].
Dictionaries
Items are stored in a key, value pair in a dictionary.
Dictionaries are defined using curly braces {}
and are ordered.
Sets
Sets are defined using curly braces {}
and are unordered.
ages = {19,20,21,22,23}
ages
{19,20,21,22,23}
Functions
A function is a block of code that runs when it is called.
a function is defined with the def
keyword.
def name():
print('eric')
name()
eric
Here, name() is calls the function to execute.
In Conclusion, that was an overview of getting strarted with python programming for beginners. As part of LUX Academy,i am happy to be here.
Top comments (2)
This is so nice and informative. Looking forward for more.
youtube.com/playlist?list=PLlrxD0H... Microsoft's Python Playlist