This project for beginners and it give brief introduction of string, integer, float and concatenation.
#python #pythonprogramming #miniproject #coding #beginners
Difference between string, Integer and Float.
String:
A string is sequence of characters enclosed in
single or double "" qoutes.
It represents the textual data and can contain
letters, numbers, symbols or any combination
of these in double qoutes.
for example: "Hello World" , "Hello John",
"123 Hello Mic Testing".
Integers:
An Integer is whole number without any fractional
portion.
It can be positive or negative.
For Example:
0, 100, -300, -980, 1090, 14000 are
all integers.
Note: Zero is also integer.
Float:
A float is a numerical value that contains
a decimal portion.
It represents real numbers and can used to store
both whole numbers and fractions.
For Example:
3.14, 40.00, 56.89 are all floats.
Code is below.
#How to use str, int and float and concatenate the results.
your_name = str(input("What is your name? "))
birth_year = int(input("What is your birth year? "))
school_percenatage = float(input("What is your school percentage? "))
#Now make function to concatenate the result.
userdata = f"My name is {your_name}, my birth year is {birth_year} and my school percentage is {school_percenatage}%"
print(userdata)
#Now run the function and check it.
Auf dieser Seite können Sie das Online-Video Python Mini Project String, Integer, Float and Concatenate Mini Project mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer DevOpsUsman 23 Juli 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 21 Mal angesehen und es wurde von 0 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!