Q.Schools use “Student Management Information System” (SMIS) to manage student-related data. This system provides facilities for:
• recording and maintaining personal details of students.
• maintaining marks scored in assessments and computing results of students.
• keeping track of student attendance.
• managing many other student-related data. Let us automate this process step by step.
Identify the personal details of students from your school identity card and write a program to accept these details for all students of your school and display them in the following format.
Name of School
Student Name: PQR Roll No: 99
Class: XI Section: A
Address : Address Line 1
Address Line 2
City: ABC Pin Code: 999999
Parent’s/ Guardian’s Contact No: 9876543210
Name of School
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →Accept the ID-card fields (name, roll no, class, section, two address lines, city, pin code, guardian's contact) for each student with input(), then print them in the prescribed card layout using string alignment methods.
This case study is the first step of the SMIS automation: capturing personal details and displaying them in a fixed format. Two ideas do the work: (1) input() collects each field as a string — even roll number and pin code can stay strings, since we never do arithmetic on them; (2) string methods center() and ljust() produce the aligned, card-like layout without manually counting spaces. A for loop repeats the process for all students of the school.
The personal details a school identity card typically carries: student name, roll number, class, section, address, city, pin code and parent's/guardian's contact number — exactly the fields in the required format.
# SMIS - step 1: accept and display students' personal details
n = int(input("How many students? "))
school = input("Enter name of school: ")
for i in range(n):
print("\n--- Enter details of student", i + 1, "---")
name = input("Student name: ")
roll = input("Roll no: ")
cls = input("Class: ")
sec = input("Section: ")
addr1 = input("Address line 1: ")
addr2 = input("Address line 2: ")
city = input("City: ")
pin = input("Pin code: ")
contact = input("Parent's/Guardian's contact no: ")
# ---- display in the prescribed format ----
print("\n" + school.center(45))
print("\nStudent Name:", name.ljust(16), "Roll No:", roll)
print("Class:", cls.ljust(23), "Section:", sec)
print("Address : ", addr1)
print(" ", addr2)
print("\nCity: ", city.ljust(19), "Pin Code:", pin)
print("Parent's/ Guardian's Contact No:", contact)
Key lines:
school.center(45)centres the school name across the card's width. …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.