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...
Sur cette page du site, vous pouvez voir la vidéo en ligne Data Types | User Input | Python Programming | Developers Community durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur ML Doctrine 20 juin 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 46 fois et il a aimé 5 téléspectateurs. Bon visionnage!