In this Video you will know about Python Data Types and comments in python an how to take user input.
Support My channel
Subscribe and like the video.
Thanks
Source Code:
So for single lined comments we wil put #(hashtag)
"""
For Multiple Lines we put 3 inverted commas sets
"""
#Now lets know about Datatypes
"""
Integer Datatpye(To take number inputs
String Datatype(Used r suggested by Python is used to take every single chracter on keyboard)
Float Datatype(Used to take decimal values)
Double Datatype(Used for both integer and float variables)
so these are the main datatypes nd now lets move forward
"""
num = input("Enter First Number = ")
print(num)
num2 = input("Enter Second Number = ")
print(num2)
#so now this is simply a input from user of integer type variable
#lets do a simple addition code as an example
num3 = int(num)+int(num2) #so now this int convert the string we take as an input into integer variable and add them
print(num3)
#Now see its 12
#So now lets take decimal input and lets see what happend------
fl = input("Enter Floating Number ")
fl2 = input("Enter Floating Number ")
fl3 = float(fl)+float(fl2);
print(fl3)
#So our answer is 7.7 in decimal
Also follow me on Instagram:
/ developers.comm
Like our fb page:
https://www.facebook.com/Developers-C...
Nesta página do site você pode assistir ao vídeo on-line Data Types | User Input | Python Programming | Developers Community duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário ML Doctrine 20 Junho 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 46 vezes e gostou 5 espectadores. Boa visualização!