-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFirstProgram.py
More file actions
27 lines (17 loc) · 818 Bytes
/
Copy pathFirstProgram.py
File metadata and controls
27 lines (17 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#Practice Question:- Write a program to input 2 numbers & print their sum.
num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))
sum = num1 + num2
print("sum =", sum)
#Practice Question : - Write a program to input side of a square & print its area
side = float(input("Enter side of square: "))
print("area of square =", side*side)
#Practice Question : - Write a program to input 2 floating point numbers and print their average
a = float(input("Enter first number: "))
b = float(input("Enter second number: "))
print("average =", (a + b)/2)
#Practice Question : - Write a program to input 2 int numbers , a and b .
#Print True if a is greater than or equal to b. If not print false
x = int(input("Enter first integer: "))
y = int(input("Enter second integer: "))
print(x >= y)