Skip to content

Commit ce3823d

Browse files
committed
Update README.md
update the function template
1 parent 85e47f5 commit ce3823d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,26 @@ My goal is to make a UI using Tkinter; however for now, the Veiw will just run f
1616

1717
DESIGN:
1818

19-
Make sure your functions follow this template:
19+
function template:
2020

2121

22-
23-
24-
def meter(num,ans):
22+
def meter(num,endU):
2523

26-
if ans == "centimeters" or "centi" or "Centimeters" or "CENTIMETERS":
24+
if endU == "centimeters" or "centi" or "Centimeters" or "CENTIMETERS":
2725

2826
num1 = num
2927
num *= 100
3028

31-
print num1, "meter equals", num, "centimeters"
29+
return num
3230

33-
elif ans == 2:
31+
elif endU == "feet" or "Feet" or "FEET":
3432
3533
num1 = num
3634
num *= 3.28084
3735

3836
print num1, "meter equals", num, " feet"
3937

40-
elif ans == 3:
38+
elif endU == "inches" or " inche":
4139
num1 = num
4240
num *= 39.3701
4341

@@ -48,3 +46,4 @@ def meter(num,ans):
4846
pass
4947

5048

49+

0 commit comments

Comments
 (0)