File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ """
2+ Student Registration Form
3+ This program collects student details and displays them in a formatted manner.
4+ """
5+
6+ def main ():
7+ """Main function to collect and display student information."""
8+
9+ print ("=" * 60 )
10+ print ("STUDENT REGISTRATION FORM" .center (60 ))
11+ print ("=" * 60 )
12+ print ()
13+
14+ # Collecting user input
15+ name = input ("What is your name? " )
16+ reg_number = input ("What is your registration number? " )
17+ department = input ("What is your department? " )
18+ faculty = input ("What is your faculty? " )
19+ course = input ("What is your course of study? " )
20+ level = input ("What is your current level of study? " )
21+ programme = input ("What is your programme of study? " )
22+ state = input ("What is your state of residence? " )
23+ nationality = input ("What is your nationality? " )
24+
25+ # Displaying the collected information in a formatted form
26+ print ("\n " + "=" * 60 )
27+ print ("STUDENT DETAILS" .center (60 ))
28+ print ("=" * 60 )
29+ print (f"""
30+ Name: { name }
31+ Registration Number: { reg_number }
32+ Department: { department }
33+ Faculty: { faculty }
34+ Course of Study: { course }
35+ Level: { level }
36+ Programme of Study: { programme }
37+ State of Residence: { state }
38+ Nationality: { nationality }
39+ """ )
40+ print ("=" * 60 )
41+ print ("Thank you for registering!" .center (60 ))
42+ print ("=" * 60 )
43+
44+
45+ if __name__ == "__main__" :
46+ main ()
You can’t perform that action at this time.
0 commit comments