You are on page 1of 2

-----------------------------------------------------------------------------------

--------------------------------------------------------
---------------------------------------------------------- $ PYTHON $
-----------------------------------------------------
-----------------------------------------------------------------------------------
--------------------------------------------------------

Basic think in python is printing.


so the printing is done in python by using print statement.
So the python take's anything that is placed in the print statement.
Basic program of all time ..
||||||||||||||||||||||||||||||||||||
program to print hello world
||||||||||||||||||||||||||||||||||||

print("Hello,world")
^^^^^^
Output:-
Hello,world

So,anything can be printed generally ..any kind of shapes or anything that across
our mind that is possible to draw through the provided 256 acsii key's ..
||||||||||||||||||||||||||||||||||||
program to print a random shape
||||||||||||||||||||||||||||||||||||
print("---------")
print("|")
print("|")
print("---------")
^^^^^^^
Output:-
----------
|
|
----------
So, therefore any shape can be printed by our order it is printed.The above random
shape can be modified by changing the patten.

|||||||||||||||||||||||||||||||||||||||||||||||||||
program to print random shape with other patten

|||||||||||||||||||||||||||||||||||||||||||||||||||
print("|")
print("----------")
print("|")
print("----------")
^^^^^^^^
Output:-
|
------------
|
------------

-----------------------------------------------------------------------------------
---------------------------------------------------------
Variable:-
-----------------------------------------------------------------------------------
---------------------------------------------------------
A space that holds some value that is defined and given by computer user.
In python variable is can be uses so efficently.
For an example.
[[[[[[[[[[[[[[[[[[[
Lets think of writing a autobiography on APJ abdul kalam ...So, the whole
book we will be using his name so in there is a person
similary to APJ abdul kalam so the same story repeat's so instead of
rewriting the whole autobiography it can be replaced with the
variable which holds the value or string or anything that u give.
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
{ character_name = "way"
print("number doesnt need quoatations")
print(" There a possible "+ character_name +
"o attack anyone in the world .")
character_name="trap"
print(character_name+ " the the path to walk in
the road in walking" + character_name + ".")
character_name="loop"
print(" enter the " + character_name + " to
work in like boss")
print("======================")
print("the man was.")
}
From the above the character_name hold's the string
way quoated from bothside ..So, everytime we change the word we no need to retype
everything ..we just need to Change string in one place.. so those + symbols are
nothing but it is adding the string to the string ..so the + symbol implies that...

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-------------------------------------------------
Data Types
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-------------------------------------------------
In python there are many types of datatypes .
some of them are ..
string,integer,boolean value's
------->String:-[String is nothing but a group of plain text].
And for example lets take an example that .
for string ..in python string is printed in console using print("the
following in b/w quotations are string").
[[[[[[[[[[[[[[Ex:
print("This is a string")
so,basically this is string.
--------
------------
--------------->Integer:-[Integer is nothing but a number which can be in any form
normal or decimal].
And for example
[[[[[[[[[[[[[[[[[[[[[
integer_age=70
--------------------
----------------------------
------------------------------------
--------------------------------------------->

You might also like