-
Notifications
You must be signed in to change notification settings - Fork 0
/
10_functions.py
69 lines (43 loc) · 1.36 KB
/
10_functions.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# define function to check spell and chenge code of multiple line with sngle line editing.
#first way
def print_tayyab():
print("i am tayyab hussai bjawa")
print("i am tayyab hussain bjawa")
print("i am tayyab hussain bjawa")
print_tayyab()
#2
def print_tayyab(text):
print(text)
print(text)
print(text)
print_tayyab("i am micheal chuchu hussy")
#defining a function by if else and elif statement
def school_calculator(age):
if age==4:
print("ali can go to school")
elif age>4:
print("ali is necessary to send to the school")
else:
print("ali let him play yet")
school_calculator(3)
# defining a function of future prediction
def recent_car(corolla):
future_car=corolla+" mercedes"
return future_car
print(future_car)
future_predicted_car=recent_car("corolla")
print(future_predicted_car)
#also
recent_cash_amount=10000895578578585555555555555555555555555555
cash_amount_of_5_years_later=110000
future_cash_amount=recent_cash_amount+cash_amount_of_5_years_later
future_predictions=future_cash_amount+50000000000999999999999999999999999999999999999
print(future_predictions)
#definig the future age
def recent_age(age):
upcoming_age=age+20
return upcoming_age
print(upcoming_age)
future_age=recent_age(18)
print(future_age)
#Alhamdulillah done also with this.