Observe the given code carefully. Try to understand from the given code and the outputs what to write in your class Dolls. Output: Doll: Tweety # Write your code here obj_1 = Dolls("Tweety", 2500) print(obj_1.detail()) if obj_1 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: Total Price: 2500 taka Thank you! Doll: Daffy Duck Total Price: 1800 taka print("Thank you!") Thank you! Doll: Bugs Bunny print("= obj_2 = Dolls("Daffy Duck", 1800) print(obj_2.detail() if obj_2 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: =") Total Price: 3000 taka Congratulations! You get the Tweety as a gift! Doll: Porky Pig Total Price: 1500 taka print("Thank you!") Thank you! print("= obj_3 = Dolls("Bugs Bunny", 3000) print(obj_3.detail(0) if obj_3 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: Dolls: Daffy Duck Bugs Bunny Total Price: 4800 taka Congratulations! You get the Tweety as a gift! print("Thank you!") print(": obj_4 = Dolls("Porky Pig", 1500) print(obj_4.detail(0) if obj_4 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: ") print("Thank you!") print(": obj_5 = obj_2 + obj_3 print(obj_5.detail(0) if obj_5 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: print("Thank you!")

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Observe the given code carefully. Try to understand from the given code and the
outputs what to write in your class Dolls.
Output:
Doll: Tweety
# Write your code here
obj_1 = Dolls("Tweety", 2500)
print(obj_1.detail())
if obj_1 > obj_1:
print("Congratulations! You get the Tweety as a gift!")
else:
Total Price: 2500 taka
Thank you!
Doll: Daffy Duck
Total Price: 1800 taka
print("Thank you!")
Thank you!
Doll: Bugs Bunny
print("=
obj_2 = Dolls("Daffy Duck", 1800)
print(obj_2.detail()
if obj_2 > obj_1:
print("Congratulations! You get the Tweety as a gift!")
else:
=")
Total Price: 3000 taka
Congratulations! You get the Tweety as a gift!
Doll: Porky Pig
Total Price: 1500 taka
print("Thank you!")
Thank you!
print("=
obj_3 = Dolls("Bugs Bunny", 3000)
print(obj_3.detail(0)
if obj_3 > obj_1:
print("Congratulations! You get the Tweety as a gift!")
else:
Dolls: Daffy Duck Bugs Bunny
Total Price: 4800 taka
Congratulations! You get the Tweety as a gift!
print("Thank you!")
print(":
obj_4 = Dolls("Porky Pig", 1500)
print(obj_4.detail(0)
if obj_4 > obj_1:
print("Congratulations! You get the Tweety as a gift!")
else:
")
print("Thank you!")
print(":
obj_5 = obj_2 + obj_3
print(obj_5.detail(0)
if obj_5 > obj_1:
print("Congratulations! You get the Tweety as a gift!")
else:
print("Thank you!")
Transcribed Image Text:Observe the given code carefully. Try to understand from the given code and the outputs what to write in your class Dolls. Output: Doll: Tweety # Write your code here obj_1 = Dolls("Tweety", 2500) print(obj_1.detail()) if obj_1 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: Total Price: 2500 taka Thank you! Doll: Daffy Duck Total Price: 1800 taka print("Thank you!") Thank you! Doll: Bugs Bunny print("= obj_2 = Dolls("Daffy Duck", 1800) print(obj_2.detail() if obj_2 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: =") Total Price: 3000 taka Congratulations! You get the Tweety as a gift! Doll: Porky Pig Total Price: 1500 taka print("Thank you!") Thank you! print("= obj_3 = Dolls("Bugs Bunny", 3000) print(obj_3.detail(0) if obj_3 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: Dolls: Daffy Duck Bugs Bunny Total Price: 4800 taka Congratulations! You get the Tweety as a gift! print("Thank you!") print(": obj_4 = Dolls("Porky Pig", 1500) print(obj_4.detail(0) if obj_4 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: ") print("Thank you!") print(": obj_5 = obj_2 + obj_3 print(obj_5.detail(0) if obj_5 > obj_1: print("Congratulations! You get the Tweety as a gift!") else: print("Thank you!")
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education