Data Types | User Input | Python Programming | Developers Community

Published: 20 June 2022
on channel: ML Doctrine
46
5

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...


On this page of the site you can watch the video online Data Types | User Input | Python Programming | Developers Community with a duration of hours minute second in good quality, which was uploaded by the user ML Doctrine 20 June 2022, share the link with friends and acquaintances, this video has already been watched 46 times on youtube and it was liked by 5 viewers. Enjoy your viewing!