Menu Close

Largest Number in list python…-FTC

Python Program to Find the Largest Number in a List.

Input :
First Line: Number Of Elements in the list

Second Line: Elements of the List

Output :
Prints the largest element of the list

N=int(input('Enter the N values: '))

l=list(map(int,input('Enter the list of numbers: ').split(' ')))
l.sort()
print('Largest Number in the list: ',l[N-1])  # or you can use max(l) instead of l[N-1].

Input_1:
Enter the N values: 3
Enter the list of numbers: 23 567 3
Output:
Largest Number in the list: 567


Input_2:
Enter the N values: 4
Enter the list of numbers: 34 56 24 54
Output:
Largest Number in the list: 56


Input_3:
Enter the N values: 5
Enter the list of numbers: 69 52 325 8541 54
Output:
Largest Number in the list: 8541


Morae Q!

->Convert Numbers into Roman Numerals
->Given the string s, return the size of the longest sub-string
->Given an array of string words. Return all strings in words which is sub-string of another word in any order.
->Return the minimum positive value of startValue such that the step by step is never less than 1.
->Given the number k, return the minimum number of Fibonacci.
->Given a string s of zeros and ones, return the maximum score after splitting the string
->Given a sorted array and a value x,Write a efficient functions to find floor of x.
->Print all numbers less than n which are having digits only 3 or 7 or both.
->Function that returns true if given array can be divided into pairs.
->Find the smallest element in the list that is larger than the given target.
->Print the First N prime numbers.
->The Chef’s Binary Tree.
->The minimum number of strikes he will have to make.(so that all his enemies have the same name)
->Sum of Natural Numbers.
->Sum of the Input.
->Find the Sum of the Series: 1 + 1/2 + 1/3 + .. + 1/N.
->Put Even and Odd elements in a List into Two Different Lists.
->Python Program to Merge Two Lists and Sort it.
->Median of Three.
->Python Program to Find the Largest Number in a List.