DEV Community

Discussion on: Dragon game

Collapse
 
faranaiki profile image
Muhammad Faran Aiki

Well, a little suggestion for me....

You can import like,

import random, time
Enter fullscreen mode Exit fullscreen mode

You can use,

# You can use """ this """ interline.
print("""You are in a land full of dragons, In front of you,
you see two caves. In one cave, the dragons id friendly
and will share his treasure with you. The other dragon
is greedy and hungry, and will eat you in sight""")
Enter fullscreen mode Exit fullscreen mode

And you can use,

while playAgain.lower() in ("yes", "y", "ye"): # This is simpler.
    # ...
Enter fullscreen mode Exit fullscreen mode

Avoid,

    print("A large dragon jumps out in front of you! HE open his jaws...")
    print()
Enter fullscreen mode Exit fullscreen mode

Rather, use,

    print("A large dragon jumps out in front of you! HE open his jaws...\n")
Enter fullscreen mode Exit fullscreen mode