Below is a program to create a list of students’ marks with user-defined values and find the maximum marks of subject.

n = int(input("Enter the number of subjects :"))
l=[]
for i in range (n) :
    m=int(input("Enter the marks obtained in subject " +str(i+1)+ " : "))
    l.append(m)
print("congratulations !! your maximum marks scored is " +str(max(l)))

Python program to get max numbers

Output:

Python program to get max numbers

Explore More

Python tutorials

We are starting a Python Tutorials Series for Beginners and Professionals. In these Python Tutorials, we will cover all the features of Python. You will learn from basic to advanced-level features

end and sep in Python

end in Python The end is a parameter in Python’s built-in print() function/method that controls what character(s) are printed at the end of the printed text.  Syntax : Output :

f-strings in Python

Python offers a powerful feature called f-strings (formatted string literals) to simplify string formatting and interpolation. f-strings is introduced in Python 3.6 it provides a concise and intuitive way to embed expressions and variables