15. Write a python function to show the details of student name, student age, cumulative score, and course in University and arranged in four separate lines.
The output is:
Expected Answer:
Student name: Mason
Student age: 20
Cumulative score: 3.9
Course: Computer Science
Sample Answer:
def student_details(): student_name = "Mason" student_age = 20 cumulative_score = 3.9 course = "Computer Science" print("Student name: {}\nStudent age: {}\nCumulative score: {}\nCourse: {}".format(student_name, student_age, cumulative_score, course)) student_details()
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)