Write a constructor with parameters self, num_mins and num_messages. num_mins and num_messages should have a default value of 0. Sample output with one plan created with input: 200 300, one plan created with no input, and one plan created with input: 500 My plan... Mins: 200 Messages: 300 Dad's plan... Mins: 0 Messages: 0 Mom's plan... Mins: 500 Messages: 0
Write a constructor with parameters self, num_mins and num_messages. num_mins and num_messages should have a default value of 0. Sample output with one plan created with input: 200 300, one plan created with no input, and one plan created with input: 500 My plan... Mins: 200 Messages: 300 Dad's plan... Mins: 0 Messages: 0 Mom's plan... Mins: 500 Messages: 0
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...
Related questions
Question
100%

Transcribed Image Text:Upload Documents for Free Acce X
Announcements - IT-140-J6182
zy Section 8.6 - IT 140: Introduction X
Answered: ting Write a program X
https://learn.zybooks.com/zybook/SNHUIT140V3/chapter/8/section/6
= zyBooks My library > IT 140: Introduction to Scripting v3 home > 8.6: Class constructors
E zyBooks catalog
? Help/FAQ 8 Jose Roque
Write a constructor with parameters self, num_mins and num_messages. num_mins and num_messages should have a default
value of 0.
Sample output with one plan created with input: 200 300, one plan created with no input, and one plan created with input: 500
My plan... Mins: 200 Messages: 300
Dad's plan... Mins: 0 Messages: 0
Mom's plan... Mins: 500 Messages: 0
247772.2002516.qx3zqy7
1 class PhonePlan:
2
# FIXME add constructor
1 test
3
passed
4
'' Your solution goes here '''
All tests
def print_plan(self):
print('Mins:', self.num_mins, end=' ')
print('Messages:', self.num_messages)
6.
passed
7
8
9.
10
11 my_plan = PhonePlan(int(input()), int(input()))
12 dads_plan = PhonePlan()
13 moms_plan = PhonePlan(int(input()))
14
15 print('My plan...', end=' ')
16 my_plan.print_plan()
17
18 print('Dad\'s plan...', end=' ')
10 dads nlan nrint nlan/)
2:11 PM
O Type here to search
(D ツ
8/16/2021
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images

Recommended textbooks for you

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY