1a def
read_student_de name, num = [] ) for line in lines], on by zero is not def
tails(): year_of_birth = key=len) allowed.") __init__(self,
read_person_det print(f"Enter {n} name, usn):
return { ails() numbers:") with return a / b
open(output_file, [Link] =
'Name': senior_citizen = for i in range(n): 'w') as file: try: name
input("Enter the is_senior_citizen(
student's name: year_of_birth) for line in [Link] = usn
[Link](int(i a=
"), nput()) sorted_lines: float(input("Enter
print("\n--- the value of a: ")) [Link] =
'USN': Person Details [Link](line+'\ []
print(f"The read
input("Enter the ---") n')
list of numbers is: b=
student's USN: "), {num}") float(input("Enter [Link] = 0
print(f"Name: input_file = the value of b: "))
'Marks': {name}") input("Enter the
print(f"The mean
[float(input(f"Ent of read data is: path to the input result =
er marks for print(f"Year of {[Link](n text file: ") DivExp(a, b) def
subject {i}: ")) Birth: um)}") getMarks(self):
{year_of_birth}") output_file = print(f"The
for i in range(1, print(f"The input("Enter the result of {a} / {b} for i in
4)]} print("Senior variance of read path to the is: {result}") range(3):
Citizen: Yes" if data is: output text file:
def senior_citizen {[Link] ")
except mark =
calculate_total_a else "Senior e(num)}") AssertionError as float(input(f"Ente
nd_percentage(m Citizen: No") sort_file_content ae: r marks for
arks): print(f"The s(input_file,
subject {i+1}: "))
2a n = standard output_file)
total = int(input("Enter deviation of read print(f"Assertion
sum(marks) the length of data is: print(f"Contents Error: {ae}") [Link]
sequence : ")) {[Link](n of {input_file}
d(mark)
return total, um)}") have been sorted
except ValueError
(total / 300) * ft = 0 and written to
as ve: [Link] =
100 4 def num = {output_file}.")
sum([Link])
st = 1 input("Enter a
print(f"Value
student = number: ") 7 import shutil
Error: {ve}")
read_student_de i=2
tails() print("The import os
9 class Complex: def
print(ft,"\n",st) number entered
is:", num) display(self):
total, percentage
def create(self,
= while i<n: r, i): percentage =
calculate_total_a def
nd_percentage(st ([Link] / 300) *
tt = ft + st backup_folder_to
udent['Marks']) [Link] = r 100 # Assuming
uniqDig = _zip(folder_name
each subject is
set(num) ):
print(tt) [Link] = i out of 100
print("\n---
Student Details zip_file_name
---") ft = st print("\n---
=
Score Card ---")
for elem in f"{folder_name}.z
print(f"Name: st = tt ip" def show(self):
uniqDig:
{student['Name']}
") i+=1 print(f"Name:
print(elem, shutil.make_archi
{[Link]}")
"occurs", ve(folder_name, print(f"{[Link]}
print(f"USN: 2b def [Link](elem) 'zip', + {[Link]}i")
{student['USN']}" factorial(n): folder_name) print(f"USN:
, "times")
) {[Link]}")
if n == 0 or n 5 def print(f"Folder
print(f"Total == 1: most_common_ '{folder_name}' def
Marks: has been backed print(f"Marks:
words(file_name, addComplex(x,
{total:.2f}") up to {[Link]}")
return 1 num_words): y):
'{zip_file_name}'.
print(f"Percentag ") print(f"Total
else: with resComplex =
e: Marks:
open(file_name, Complex()
{percentage:.2f} folder_name = {[Link]}")
return n * 'r') as file:
%") factorial(n - 1) input("Enter the
name of the
words = [Link]
1b def folder to back up: print(f"Percentag
def [Link]().transla = [Link] + [Link]
read_person_det ") e:
binomial_coeffici te([Link]('
ails(): {percentage:.2f}
ent(n, r): ', '',
if %")
[Link] [Link]
name = n)).lower().split() [Link](fold
return = [Link] + [Link]
input("Enter the er_name):
factorial(n) //
person's name: ") (factorial(r) * word_counts = return
Counter(words) # Main program
factorial(n - r)) resComplex
year_of_birth = backup_folder_to
int(input("Enter _zip(folder_name name =
N= return
the person's year ) input("Enter the
int(input("Enter word_counts.mo
of birth: ")) st_common(num student's name:
the value of N: ")) a = Complex()
_words) else: ")
return name, R= print(most_com
year_of_birth mon_words('text print(f"Folder [Link](9, 6) usn =
int(input("Enter
_file.txt', 10)) '{folder_name}' input("Enter the
the value of R: "))
def does not exist in b = Complex() student's USN: ")
is_senior_citizen( 6 def the current
binom_coeff =
year_of_birth): sort_file_content working [Link](4, 3) student =
binomial_coeffici
s(input_file, directory.") Student(name,
ent(N, R)
current_year = output_file): c= usn)
2025 # Update 8 def DivExp(a, addComplex(a, b)
print(f"\nThe
this to the with b): [Link]
binomial
current year open(input_file, [Link]() ()
coefficient (C({N},
{R})) is: 'r') as file: assert a > 0,
age = {binom_coeff}") "The value of 'a' [Link]()
current_year - lines = must be greater
year_of_birth [Link]() than 0."
3 import statistics
return age >= if b == 0:
n=
60 int(input("Enter
the value of n: ")) sorted_lines = raise
10 class Student:
sorted([[Link]( ValueError("Divisi