LearnPy Hub
← Classes & Objects problems
Easy

Book Information

Write class Book with title, author and pages, and a method info() returning TITLE by AUTHOR (PAGES pages). Read the three values (one per line) and print info().

Input

Three lines.

Output

One line.

Sample 1

Input
Python 101
Mim
250
Output
Python 101 by Mim (250 pages)

Sample 2

Input
A
B
1
Output
A by B (1 pages)
solution.py
Output appears here
Book Information · Python practice problem · LearnPy Hub