Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

if name _main__': smeagol Thief (Gollum, 11, 4, 1) bruce = Ninja(Batman, 10, 5, 1) print (smeagol) #Gollum: 88 HP print (bruce) #Batman: 80 HP

if name _main__': smeagol Thief ("Gollum", 11, 4, 1) bruce = Ninja("Batman", 10, 5, 1) print (smeagol) #Gollum: 88 HP print (bruce) #Batman: 80 HP smeagol.attack(bruce) print (smeagol.hidden, print (bruce) #Batman: bruce.attack(smeagol) T #Gollum sneak attacks Batman for 60 damage bruce.hidden) #False False 20 HP #Batman attacks Gollum for 8 damage print (smeagol.hidden, bruce.hidden) #False True print (bruce) #Batman: smeagol.attack (bruce) 30 HP # Gollum can't see Batman bruce.attack(smeagol) #Batman sneak attacks Gollum for 60 damage print (smeagol) #Gollum: 20 HP print (bruce) #Batman: 40 HP print(smeagol.hidden, bruce.hidden) #False True

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

The Database Factory Active Database For Enterprise Computing

Authors: Schur, Stephen

1st Edition

0471558443, 9780471558446

More Books

Students also viewed these Databases questions