File tree 5 files changed +32
-0
lines changed
5 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ m = input ("m: " )
2
+ E = int (m ) * (300000000 ** 2 )
3
+ print (f"E: { E } " )
Original file line number Diff line number Diff line change
1
+ text = input ()
2
+ text = text .replace (":)" ,"🙂" )
3
+ text = text .replace (":(" , "🙁" )
4
+ print (text )
Original file line number Diff line number Diff line change
1
+ text = input ()
2
+ text = text .lower ()
3
+ print (text )
Original file line number Diff line number Diff line change
1
+ text = input ()
2
+ text = text .replace (" " ,"..." )
3
+ print (text )
Original file line number Diff line number Diff line change
1
+ def main ():
2
+ dollars = dollars_to_float (input ("How much was the meal? " ))
3
+ percent = percent_to_float (input ("What percentage would you like to tip? " ))
4
+ tip = dollars * percent
5
+ print (f"Leave ${ tip :.2f} " )
6
+
7
+ # meal
8
+ def dollars_to_float (d ):
9
+ d = d .replace ("$" ,"" )
10
+ return float (d )
11
+
12
+ # percent
13
+ def percent_to_float (p ):
14
+ p = p .replace ("%" ,"" )
15
+ p = float (p )
16
+ p = p / 100
17
+ return p
18
+
19
+ main ()
You can’t perform that action at this time.
0 commit comments