Programming with python 2

Last week we discussed datatypes, this week we’ll be talking about the assignment statement “=”
The “=” is used as an assignment statement since In python programming language the machine reads the code from right to left
So,

Can also be said as t…


This content originally appeared on DEV Community and was authored by E.Michael

Last week we discussed datatypes, this week we'll be talking about the assignment statement "="
The "=" is used as an assignment statement since In python programming language the machine reads the code from right to left
So,

Image description

Image description
Can also be said as the numeric value 3 is stored in the memory address of a, so when referencing a in places like,

Image description
Will give the output of 8,

Image description
All data types can be assigned this way,
I.e

Image description

Image description
Number= 50.56
Print(Number) / 50.56

With this, we're ready to write our first program
One to add two numbers.
It starts with the comment, like all programming languages python has comments in place, something you can type that would not be read by the computer, or be displayed when the program is run, the "#".

Program to add two numbers

Image description

Image description

Note:Use the exact case when referencing I.e "A" is not "a", python can be said to be case-sensitive.


This content originally appeared on DEV Community and was authored by E.Michael


Print Share Comment Cite Upload Translate Updates
APA

E.Michael | Sciencx (2022-04-30T06:27:30+00:00) Programming with python 2. Retrieved from https://www.scien.cx/2022/04/30/programming-with-python-2/

MLA
" » Programming with python 2." E.Michael | Sciencx - Saturday April 30, 2022, https://www.scien.cx/2022/04/30/programming-with-python-2/
HARVARD
E.Michael | Sciencx Saturday April 30, 2022 » Programming with python 2., viewed ,<https://www.scien.cx/2022/04/30/programming-with-python-2/>
VANCOUVER
E.Michael | Sciencx - » Programming with python 2. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/04/30/programming-with-python-2/
CHICAGO
" » Programming with python 2." E.Michael | Sciencx - Accessed . https://www.scien.cx/2022/04/30/programming-with-python-2/
IEEE
" » Programming with python 2." E.Michael | Sciencx [Online]. Available: https://www.scien.cx/2022/04/30/programming-with-python-2/. [Accessed: ]
rf:citation
» Programming with python 2 | E.Michael | Sciencx | https://www.scien.cx/2022/04/30/programming-with-python-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.