Back to Browse

Joy of python programming | Assignment 3 | program 1- Find 2nd largest number in a list | O(n) Time

33 views
Aug 16, 2024
17:20

Create a Python program that finds the second largest number in a list of positive integers(includes zero). The program should prompt the user to input a list of numbers, then compute and print the second largest number in that list. Input Format: The input consists of a single list of numbers, separated by spaces. Hint: Use .split() function to convert input to list. Output Format: The output consists of the second largest number in the input list. Example: Input: 3 1 4 1 5 9 2 6 5 3 5 Output: 6

Download

1 formats

Video Formats

360pmp422.4 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Joy of python programming | Assignment 3 | program 1- Find 2nd largest number in a list | O(n) Time | NatokHD