Python Mini Project String, Integer, Float and Concatenate Mini Project

Pubblicato il: 23 luglio 2023
sul canale di: DevOpsUsman
21
0

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.


In questa pagina del sito puoi guardare il video online Python Mini Project String, Integer, Float and Concatenate Mini Project della durata di ore minuti seconda in buona qualità , che l'utente ha caricato DevOpsUsman 23 luglio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 21 volte e gli è piaciuto 0 spettatori. Buona visione!