-
Notifications
You must be signed in to change notification settings - Fork 0
/
format.py
24 lines (19 loc) · 1.06 KB
/
format.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name = 'Murtaza'
surname = 'Abdissamat'
age = 28
# Aldingi sabaktagi string biriktiru joli
#print("My name is " + name + " and surname is " + surname + " and I'm " + str(age) + " years old.")
# # Format funksiasi turi 1
# print("My name is {} and surname is {} and I'm {} years old.".format(name,surname,age))
# # Format funksiasi turi 2
#print("My name is {0} and surname is {1} and I'm {2} years old.".format(name,surname,age))
#print("My name is {2} and surname is {1} and I'm {0} years old.".format(name,surname,age))
# # Format funksiasi turi 3
#print("My name is {n} and surname is {s} and I'm {a} years old.".format(n=name,s=surname,a=age))
#print("My name is {s} and surname is {a} and I'm {n} years old.".format(n=name,s=surname,a=age))
# # Format iwinde sandi dongelekteu (0.21562614 = 0.21)
# a = 200/700
# print("san = {s:.2}".format(s = a))
# Format jazudin kiska joli
print(f"My name is {name} and surname is {surname} and I'm {age} years old.")
print("My name is " + name + " and surname is " + surname + " and I'm " + str(age) + " years old.")