Answer to Question #302609 in Python for Nav

Question #302609

You are given space separated integers as input.



Write the program to print the maximum number among the given numbers

1
Expert's answer
2022-02-25T07:53:09-0500
arr=[]

print("Enter integers (space separated): ", end='')
a = input().split()
for i in range(len(a)):
   arr.append(int(a[i]))
max = arr[0]
for i in range (len(arr)):
   if max < arr[i]:
      max = arr[i]
print("Maximum number: ", max)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS