Learn to Code via Tutorials on Repl.it!

← Back to all posts
check my first lesson
JulianSitoula (0)

print (" Data Type")

print ("\n string ")

print ( " explanation ")

print ( " ** STRING CAN BE ALPHABETS, CHARACTERS, WORDS, SENTENCE, IT CAN ALSO BE NUMBERS, etc, String literals may be delimited using either single or double quotes. " )

print ( " **explanation 2 " )

print ( " String can be alphabets, characters, words, sentence, it can also be number's, etc, either single or double quotes " )

print("Julian",'python') #string

print("\n INTEGER " )

print("They are often written as an int, they are positive or negative whole numbers with no decimal point")

print("ex:", 20 , -40) #integer

print("\n FLOAT " )

print("The float type in Python designates a floating-point number. Float values are specified with a decimal point, exactly opposite of integer")

print(10.6)

print("\n BOOLEAN " )

print("Boolean type may have one of two values, True or False")

print(True, False)

print("\n Variables " )

print("Variables can be used to store items")

var = "Hi Jolly Today Is",15, "I Hope You Are Doing Good !"
print(var)

print("\n \n ")
print("\n Datatype Programs " )
#Datatype Programs

a = "Python" #String
print (a)

b = 9 #Integer
print (b)

c = 2.5 #Float
print (c)

d = True, False #Boolean
print (d)

print("\n User Input & Datatype Programs \n" )

print("For User Input We Use The input() function \n ")
#syntax : datatype(input("prompt message - hint you provide to the user about the expectation of the input"))

a = input("Enter String Data:") #by default the data type of input is string so you dont have to mention it
print(a)
print("\n")

b = int(input("Enter Any Integer Data:")) #int - integer
print(b)

print("\n")

c= float(input("Enter Any FLoat Data:"))
print(c)