Computer Science, asked by mharay0703, 1 month ago

Write a program that would input 5 numbers and using function called HighestNumber() will output the

highest number among 5 inputs, another function called HighestSecondNumber() that will output the

second highest number and another function called OddEven() to identify wheather the highest and

second highest number are odd r even.




NOTE: NO USING OF FUNCTION WILL BE INVALID SCORE!

Expected Output:

Enter 5 numbers:

6

3

9

10

2

Highest Number: 10

Second Highest Number: 9

10 -even

9 -Odd​

Answers

Answered by HozaifaNazarSiddiqui
1

def HighestNumber(n1, n2, n3, n4, n5):

lis = [n1, n2, n3, n4, n5]

score, score2, score3, score4, score5 = 0

for j in lis:

if n1 > j:

score += 1

if n2 > j:

score2 += 1

if n3 > j:

score3 += 1

and so on

Answered by moshnetic
0

Answer:

Refer attachment for answer

Attachments:
Similar questions