SMGPlaza

How to learn Python Programming.

hello, guys welcome to SMGPLAZA we are continuing our article, at last, we see what is python How to download and install python in your local system In this, we know about the Basic Syntax Of Python. if you don’t read our previous article then visit this link https://smgplaza.com/how-to-get-started-with-python/ in this article we are studying about basic syntax of python means there are two modes of python programing there are some method or rules of python identifiers and which keywords are reserved by a python that all topics are discussed today if you have any query then you also DM us on Instagram our Instagram handles are mentioned at end of this article

Let’s start…

Basic – syntax Of Python ...

python programming language have many similar things to c, Perl, and java but the python has much big difference to compare with those, python is easy to compare with java or c you have to writ some code which has 50 lines but in python that is completed into 20 to 25 lines

Let execute one simple program in different ways

Interactive Mode Programming

iterative mode programming is a CMD (command-line shell )which gives instant reply or output for each statement while running previously fed statement inactive memory when you have to just perform the basic operation or basic python code then generally this mode is used.

if you are using python version series 3.0. something then you have to perform below code

print("hello world")

if you are using python version series 2.0. something then you have to perform below code

print "hello world"

Output of above code is same for both version just in 2.0 there are no braces

hello world

also visit:- How to install Android Studio on Windows

Script Mode Programming

Invoking the interpreter with a script parameter starts the execution of the script and maintains until the script is finished. When the script is finished, the interpreter is no longer lively.

print "Hello world"

we assume you have set the interpreter of python as a PATH variable now when you write code as above and save as test1.py for a run this file you have to code like below, you have to write below code in CMD

$ python test.py

After Running this above then you get output like below

Hello world

Python Identifiers

a python identifier which is the user to give a name to variable, class, method, function, and object of the class. this method is basically for which type of name you can give.

this is saying if you want to give a name you have to start with A to Z or a to z or an underscore ( _ ) followed by zero or more digits ( 0 to 9 ).

In this python say you don’t have to use special characters such as @, $ and %

Python is a case sensitive language that means when you define one variable with the name School and one with school then both are different.

Reserved words of python

The below list of keywords are already reserved by python you do not use this for declaring a class, variable, or method you don’t use the same name suppose we have one keyword global so, we do not use to declare a class variable or anything there are some reserved keyword list is below

andassertbreak
classcontinuedef
delelifelse
exceptexecfinally
forfromglobal
ifimportin
islambdanot
orpassprint
raisereturntry
whilewithyield

If you want to learn android visit the below link we are writing all one by one all articles for android

https://smgplaza.com/category/android/

Also visit this Articles :-

If you have any doubts any suggestion or any query DM us one below Social media handles

Our Social Media Handles:-

Instagram Handle :- https://www.instagram.com/smgplaza/

Twitter Handle :- https://twitter.com/smgplaza

Thank you so much for your support you are all are very valuable for us, you have to follow us using mail id and you also follow us on social media for more updates, we are one by one covering all topics of python and android both, if you have any query then you also comment below comment box.

Leave a Comment

SMGPlaza