Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Jump to level 1 Create an instance of the Booklnfo class called my _ book. Then, assign my _ book's attributes title and num _

Jump to level 1
Create an instance of the Booklnfo class called my_book. Then, assign my_book's attributes title and num_pages with the two
values read from input, respectively.
grad Click here for example
Ex: If the input is:
The Good Moose
92
then the output is:
Book info: The Good Moose, 92 pages
class BookInfo:
def (self):
self.title = 'unknown'
self.num_pages =0
title_in = input ()
pages_in = int(input())
8
9''' Your code goes here '''
10|
11
12 print('Book info:', end='')
13 print (f'{my_book.title},', end='')
14 print(f'{my_book.num_pages Create an instance of the BookInfo class called my_book. Then, assign my_book's attributes title and num_pages with the two values read from input, respectively.
Click here for example
Ex: If the input is:
The Good Moose
92
then the output is:
Book info: The Good Moose, 92 pages
my_book.num_pages = int(input())
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions