Task - 5 Write the ScienceExam class so that the following code generates the output below: class Exam: OUTPUT: def _init_(self,marks): self.marks = marks Marks: 100 Time: 90 minutes Number of Parts: 4 self.time = 60 def examSyllabus (self): return "Maths , English" def examParts(self): return "Part 1 - Maths\nPart 2 - English\n" Maths , English , Physics , HigherMaths Part 1 - Maths Part 2 - English Part 3 - Physics Part 4 - HigherMaths Marks: 100 Time: 120 minutes Number of Parts: 5 engineering = ScienceExam(100,90, "Physics", "HigherMaths") print(engineering) print('---- print(engineering.examSyllabus()) print(engineering.examParts()) print('================== architecture Maths , English , Physics , HigherMaths , Drawing Part 1 - Maths - ') Part 2 - English Physics Part 4 - HigherMaths Part 5 - Drawing ==========') Part 3 ScienceExam(100,120,"Physics","HigherMaths","Drawing") print(architecture) print('--- print(architecture.examSyllabus()) print(architecture.examParts()) ')

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Solve using Python3 and inhritance method

Task - 5
Write the ScienceExam class so that the following code generates the output below:
class Exam:
OUTPUT:
Marks: 100 Time: 90 minutes Number of
def _init_(self,marks):
self.marks = marks
Parts: 4
self.time = 60
def examSyllabus(self):
return "Maths , English"
def examParts(self):
return "Part 1 - Maths\nPart 2 - English\n"
Maths , English , Physics , HigherMaths
Part 1 - Maths
Part 2 - English
Part 3 - Physics
Part 4 - HigherMaths
======
Marks: 100 Time: 120 minutes Number of
Parts: 5
engineering = ScienceExam(100,90,"Physics","HigherMaths")
print(engineering)
print('----
print(engineering.examSyllabus ())
print(engineering.examParts())
print('====
architecture =
Maths , English , Physics , HigherMaths
, Drawing
Part 1 - Maths
Part 2 - English
Part 3 - Physics
Part 4 - HigherMaths
Part 5 - Drawing
===' )
ScienceExam(100,120,"Physics", "HigherMaths","Drawing")
print(architecture)
print('------
print(architecture.examSyllabus())
print(architecture.examParts())
--')
Transcribed Image Text:Task - 5 Write the ScienceExam class so that the following code generates the output below: class Exam: OUTPUT: Marks: 100 Time: 90 minutes Number of def _init_(self,marks): self.marks = marks Parts: 4 self.time = 60 def examSyllabus(self): return "Maths , English" def examParts(self): return "Part 1 - Maths\nPart 2 - English\n" Maths , English , Physics , HigherMaths Part 1 - Maths Part 2 - English Part 3 - Physics Part 4 - HigherMaths ====== Marks: 100 Time: 120 minutes Number of Parts: 5 engineering = ScienceExam(100,90,"Physics","HigherMaths") print(engineering) print('---- print(engineering.examSyllabus ()) print(engineering.examParts()) print('==== architecture = Maths , English , Physics , HigherMaths , Drawing Part 1 - Maths Part 2 - English Part 3 - Physics Part 4 - HigherMaths Part 5 - Drawing ===' ) ScienceExam(100,120,"Physics", "HigherMaths","Drawing") print(architecture) print('------ print(architecture.examSyllabus()) print(architecture.examParts()) --')
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY