-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProblem1.py
More file actions
37 lines (29 loc) · 824 Bytes
/
Problem1.py
File metadata and controls
37 lines (29 loc) · 824 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
28
29
30
31
32
33
34
35
36
37
# Problem Statement: Write a program to find maximum,minimum,mean between three numbers.
a = int(input("Enter first number: "))
b = int(input("Enter second number:"))
c = int(input("Enter third number:"))
# Maximum among 3 numbers:
if a>b:
if a>c:
print(f'{a} is the maximum number')
else:
print(f'{c} is the maximum number')
else:
if b>c:
print(f'{b} is the maximum number')
else:
print(f'{c} is the maximum number')
# Minimum among 3 numbers:
if a<b:
if a<c:
print(f'{a} is the minimum number')
else:
print(f'{c} is the minimum number')
else:
if b<c:
print(f'{b} is the mimimum number')
else:
print(f'{c} is the minimum number')
# Mean of three numbers:
mean = (a+b+c)/3
print(f'Mean of the three number is {mean}')