File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
Github Username:
6
6
andy2124
7
+
Original file line number Diff line number Diff line change
1
+ #version 1
2
+ units = {
3
+ "feet" : 0.3048 ,
4
+ "meters" : 1
5
+ }
6
+ distance = input ("Enter Lenth of feet:" )
7
+ distance = int (distance )
8
+ total = distance * units ["feet" ]
9
+ print (f"{ distance } FT is { total } Meters" )
10
+
11
+ #version 2
12
+ units_mesurments = {
13
+ "feet" : 0.3048 ,
14
+ "miles" : 1609.34 ,
15
+ "meters" : 1 ,
16
+ "kilometers" : 1000
17
+ }
18
+
19
+ distance = input ("what is the distance?" )
20
+ units = input ("what are the units?:" )
21
+ calling = units_mesurments [units ]
22
+ distance = int (distance )
23
+ total = distance * calling
24
+
25
+ print (f"{ distance } { units } is { total } Meters" )
26
+
27
+ #version 3
28
+ units_mesurments = {
29
+ "feet" : 0.3048 ,
30
+ "miles" : 1609.34 ,
31
+ "meters" : 1 ,
32
+ "kilometers" : 1000 ,
33
+ "yards" : 0.9144 ,
34
+ "inches" : 0.0254
35
+ }
36
+
37
+ distance = input ("what is the distance?" )
38
+ units = input ("what are the units?:" )
39
+ calling = units_mesurments [units ]
40
+ distance = int (distance )
41
+ total = distance * calling
42
+
43
+ print (f"{ distance } { units } is { total } Meters" )
You can’t perform that action at this time.
0 commit comments