Variables: Variables are reserved memory locations to store values. Which means that when you create a variable, will reserve some space in memory. Note: Python variables do not need explicit declaration to reserve memory space other languages like Java,C etc., The declaration happens automatically when you assign a value to a variable. The equal sign (=) is used to assign values to variables. So, in-turn, we should only focus on assignment of variable. Two ways of assignments: Single variable assignment Multiple variable assignment Example: Python Standard Data Types: Python has five standard data types Numbers String List Tuple Dictionary 1.Numbers: Number data types store numeric values. Python supports four different numerical types integers -> a=15 long integers -> a=1888L floating point -> a=9.8 complex numbers -> a=1+2j Note: A complex number consists of pair of real floating-point numbers denoted by x +...
Print function, Strings and Math basic calculations: Print function: print() function in Python is a function that outputs to your console window whatever you say you want to print out. Strings: Strings are just "strings" of text. Note: The quotes may be single or double else you can escape them using backslash(\) . Example: Concatenation: use the "," -> it will print them out separately with a space. use the "+" -> join integers and floats together, then you will perform an arithmetic operation. Example: Math basic calculations: In python, math calculations are pretty simple enough and cool. Example: