Skip to content

Instantly share code, notes, and snippets.

module A
def student1
s1 = {name:"piyush",roll_no:111,address:"hyd", subject1:70,subject2:62,subject3:74,subject4:83,subject5:65,subject6:81,total:500,percentage:80}
end
def student2
s2= {name:"ravi",roll_no:112,address:"bngl",subject1:87,subject2:78,subject3:66,subject4:68,subject5:95,subject6:71,total:542,percentage:82}
end
end
class Student
def initialize(name,roll_no,age,address,subject1,subject2,subject3,subject4,subject5,subject6)
@name = name
@roll_no = roll_no
@age = age
@address = address
@subject1 = subject1
@subject2 = subject2
@subject3 = subject3
@subject4 = subject4