Skip to content

Commit df130f7

Browse files
committed
Q4
1 parent ddd63d6 commit df130f7

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

PracticeQ1.py

+25-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,28 @@
33
first = int(input("enter first :"))
44
second = int(input("enter second :"))
55

6-
print("sum =", first + second)
6+
print("sum =", first + second)
7+
8+
9+
#WAP to input side of a square & print its area.
10+
11+
side = float(input("enter square side :"))
12+
13+
print("area =", side * side) # side * side = side ** 2
14+
15+
16+
#WAP to input 2 floating point numbers and print thrie average.
17+
18+
a = float(input("enter first :"))
19+
b = float(input("enter second :"))
20+
21+
print("average =", (a + b) / 2)
22+
23+
24+
# WAP to input 2 integer numbers, a and b.
25+
# Print True is a is greater than or equal to b. If not print False.
26+
27+
a = int(input("enter first :"))
28+
b = int(input("enter second :"))
29+
30+
print(a >= b)

0 commit comments

Comments
 (0)