First code in python

First code:

print("hi")



Simple code:

#single line comments

"""
*****
this is
multi line
comment
*****
"""
print("#single line comments")
num1=10 #number
print("type(num1) : ",type(num1))
num2=12
print("type(num2) : ",type(num2))
str="hi"
print("type(str) : ",type(str))
float_num=1.00
print("type(float_num) : ",type(float_num))
print("num1 : ",num1)
print("num2 : " ,num2)
print("str :",str)
print("float_num :",float_num)
add=2+2
print("add :",add)
#single line comment

Output:
#single line comments
type(num1) : <class 'int'>
type(num2) : <class 'int'>
type(str) : <class 'str'>
type(float_num) : <class 'float'>
num1 : 10
num2 : 12
str : hi
float_num : 1.0
add : 4

Screenshot:








Comments

Popular posts from this blog

Tuple using Python: