InterviewSolution
Saved Bookmarks
| 1. |
Highest mark in the class The teacher who handles science for 3rd-standard class distributes the mark sheets to her students, she needs to find the highest mark among the "n" students. Help the teacher to find the maximum mark. Input Format: The first input contains an integer 'n' which denotes the number of students The remaining input denotes mark of 'n' students separated by spaces Output Format: Print the highest mark Sample Input: 5 45 67 89 34 22 Sample Output: 89 |
|
Answer» print("Enter NUMBER")inputstring=input()myList =list(map(INT,inputstring.split(' ')))markscount=myList.pop(0)if(markscount==len(myList)): print("Highest:"+ str(MAX(myList)))else: print("number of marks & values DOESNOT match")Explanation: |
|