-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex36-HomeWork.py
81 lines (70 loc) · 2.53 KB
/
ex36-HomeWork.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
70
71
72
73
74
75
76
77
78
79
80
81
from sys import exit #exit bo daxstne le excute w derchwn
from sys import argv
script, naw = argv
print("Sllaw {} yaryeke dest pe dekat".format(naw))
def jwreke():
print("Lem jwrewe destpedekeyt")
print("Lerewe detwanyt bgeyt be Alltwneke")
print("Detwanyt Dw Helbjarde bkey bo geyshtn be Alltwn")
print("Jwry Rast & Jwry beramber")
dyarykrdn = input("> ")
if dyarykrdn == "Jwry Rast":
Jwry_Rast()
elif dyarykrdn == "Jwry beramber":
Jwry_Beramber()
else:
print("Kes nazane to cht gerek? ")
def Jwry_Rast():
print("Lere Shtek heLbjere le 0 bo 100 Kg")
print("Chend kilot dewet?")
dyarykrdn = input("> ")
try:
Chend = int(dyarykrdn)
except ValueError:
print("Jmare dabne kake gyan, Alttwn nawe?")
if Chend > 50:
print("Piroze To {} kilo Alltwnt brdewe bo mall".format(Chend))
elif Chend < 50:
print("Dysan pyroze {} Kilo alltwnt brdewe".format(Chend))
else:
print("Bexwa Shayeny hych nit, Dorryay")
def Jwry_Beramber():
print("Hengaweky basht le peshe bo bedesthenany Alltwneke")
print("Lere zor Wryabe")
print("3 cor jwr heye kamyant dewe?")
dyarykrdn = input("> ")
try:
kame = int(dyarykrdn)
except ValueError:
print("Tkaye jmare bnwse")
if kame == 1:
print("Jwrekey tr mawe le pesht, Alttwny zort dewe yan kem?")
dyarykrdn = input("> ")
# le if w elif dw shewazm bekarhenawa bo nardny value. herdwky debet.
if dyarykrdn == "kem":
print("Pyroze ALttwneket brdewe, bLema zor nye xot bzane chende")
elif "zor" in dyarykrdn:
print("Pyroze brreky zor alltwnt bo derchw, Teqyt")
else:
exit(0)
elif kame == 2:
print("To Shanseket bogene")
mrdn("Yekser dechyte derewe w hych bedest naheneyt")
elif kame == 3:
print("Dw bjardet heye, tameaht zore yan temaht keme? ")
dyarykrdn = input("> ")
if "zore" in dyarykrdn or "zor" in dyarykrdn:
print("Temaht zore boye hycht bo bedest nehat")
elif "kem" in dyarykrdn or "keme" in dyarykrdn:
mrdn("Temaht nye boye ewe hallte")
else:
exit(0) #Her katek else hy4 swdkey nebw karygery nebw leser kodeke detwany exit(0) dabney
else:
mrdn("brro bo chem")
def mrdn(bochy):
print(bochy, "Serkewtw byt berrezm! Eger nemrdbety")
exit(0)
def kotayi_yaryeke():
print("Yaryeke kotayi hat berrez {} Detwanyt dwwbare hewll bdeytewe".format(naw))
jwreke()
kotayi_yaryeke()