File tree 4 files changed +40
-0
lines changed
4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ #You have a football field that is
2
+ # 92 meter long and 48.8 meter wide.
3
+ # Find out total area using python and print it.
4
+
5
+ width = 48.8
6
+ height = 92
7
+ area = width * height
8
+
9
+ print ("Total area of the football field is: " ,round (area ,2 ))
Original file line number Diff line number Diff line change
1
+ #You bought 9 packets of potato chips from a store.
2
+ # Each packet costs 1.49 dollar and
3
+ # you gave shopkeeper 20 dollar.
4
+ # Find out using python, how many dollars is the shopkeeper going to give you back?
5
+
6
+ potato_packet_count = 9
7
+ price_per_packet = 1.49
8
+
9
+ total_cost = 9 * 1.49
10
+
11
+ change = 20 - total_cost
12
+
13
+ print ("The change is: " ,change )
Original file line number Diff line number Diff line change
1
+ #You want to replace tiles in your bathroom
2
+ # which is exactly square and 5.5 feet is its length.
3
+ # If tiles cost 500 rs per square feet,
4
+ # how much will be the total cost to replace all tiles.
5
+ # Calculate and print the cost using python
6
+ # (Hint: Use power operator ** to find area of a square)
7
+
8
+
9
+ area_of_the_bathroom = 5.5 ** 2
10
+ tile_cost_per_sqfeet = 500
11
+
12
+ print ("Total cost to replace all tiles: " ,area_of_the_bathroom * tile_cost_per_sqfeet )
13
+
Original file line number Diff line number Diff line change
1
+ # Print binary representation of number 17
2
+
3
+ number = 17
4
+
5
+ print ("Binary number of 17 is: " ,format (number ,'b' ))
You can’t perform that action at this time.
0 commit comments