Data Types | User Input | Python Programming | Developers Community

Опубликовано: 20 Июнь 2022
на канале: 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...


На этой странице сайта вы можете посмотреть видео онлайн Data Types | User Input | Python Programming | Developers Community длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь ML Doctrine 20 Июнь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 46 раз и оно понравилось 5 зрителям. Приятного просмотра!