Answer to Question #294353 in Python for Saraswathi

Question #294353

In a class test teacher announces the marks (negative marking is allowed) of n students a student can achieve maximum 100 marks. Write a python function p-marks (*marks) that takes number of students, marks of students and return the marks and check the marks are valid or not. If valid then it calls the recursive function rec-sort(*marks) which returns the students marks as comma separated string with elements in ascending order (you can use built in function max or min to do this). Specify the input in fixed form do not use input function.


1
Expert's answer
2022-02-06T02:14:06-0500
print("print students marks in ascending order")


# create an empty dictionary
#D = {}
#def rec_sort(*marks):
#p = 5;


# create a list
marks= [-4, 84, 99, 76, 55]
#if marks <=100:
 #       students marks = marks.sort()
#else:
#        marks >1
#      students marks =  Invalid
#    return rec_sort(*marks)
print(marks)

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