Tuesday, 2 July 2019

Example program on Basic-data types

#Example program on Basic-data types
a=10 #int
b=12.2345 #float
c="Ravi" #string
d=10>5 #bool
e=10+3j #complex data type
print(a)
print(b)
print(c)
print(d)
print(e)

""" output:
F:\Programs\Datatypes>python basic.py
F:\Programs\Datatypes>python basic.py
10
12.2345
Ravi
True
(10+3j) """

You may like the following posts:
  Built-in Data types

No comments:

Post a Comment

Files with Exception handling

#Ask the user to take two input integer values var a,b try:     a=int(input("enter any integer value:"))     b=int(input(...