From 5544ed03ef69c695cd888492b318bd7fe7d22873 Mon Sep 17 00:00:00 2001 From: "michael rimicans (heeed)" Date: Tue, 18 Nov 2014 15:17:06 +0000 Subject: [PATCH 1/8] Addition of Python 3 compatiable version :D --- adventure_python3.py | 190 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 adventure_python3.py diff --git a/adventure_python3.py b/adventure_python3.py new file mode 100644 index 0000000..b953ff0 --- /dev/null +++ b/adventure_python3.py @@ -0,0 +1,190 @@ +__author__ = 'Les Pounder' + +#The lines below import modules of code into our game, in particular these import time functions to allow us to pause and stop the game, and random provides a method of choosing random numbers or characters. +from time import * +from random import * +import os,sys + +#This is a function, we use it to do lots of things and then call it by it's name later on +#To create a function we use "def name():" where name can be anything. + +def clear_screen(): #Simple function that clears the screen + os.system('cls' if os.name=='nt' else 'clear') + +def title(): + print (" __ _ __ ") + print (" / / ___ __ _ ___ _ __ __| | ___ / _| /\ /\___ _ __ ___ ___ ___ ") + print (" / / / _ \/ _` |/ _ \ '_ \ / _` | / _ \| |_ / /_/ / _ \ '__/ _ \ / _ \/ __|") + print ("/ /__| __/ (_| | __/ | | | (_| | | (_) | _| / __ / __/ | | (_) | __/\__ \ ") + print ("\____/\___|\__, |\___|_| |_|\__,_| \___/|_| \/ /_/ \___|_| \___/ \___||___/") +def castle(): + + print ("* |>>> + ") + print ("+ * | * +") + print (" |>>> _ _|_ _ * |>>> ") + print (" * | |;| |;| |;| | *") + print (" + _ _|_ _ \\. . / _ _|_ _ +") + print (" * |;|_|;|_|;| \\: + / |;|_|;|_|;|") + print (" \\.. / ||:+++. | \\. . / *") + print (" + \\. , / ||:+++ | \\: . /") + print (" ||:+ |_ _ ||_ . _ | _ _||:+ | *") + print (" * ||+++.|||_|;|_|;|_|;|_|;|_|;||+++ | +") + print (" ||+++ ||. . . . ||+++.| *") + print ("+ * ||: . ||:. . . . , ||: | *") + print (" * ||: ||: , + . ||: , | +") + print (" * ||: ||:. +++++ . ||: | *") + print (" + ||: ||. +++++++ . ||: . | +") + print (" + ||: . ||: , +++++++ . . ||: | +") + print (" ||: . ||: , +++++++ . . ||: | *") + print (" ||: . ||: , +++++++ . . ||: |") + +def north(): + print ("To go north press n then enter") +def east(): + print ("To go east press e then enter") +def south(): + print ("to go south press s then enter") +def west(): + print ("To go west press w then enter") + + +def setup(): + #global is used to create variables that can be used throughout our game + global name + global HP + global MP + #Our variable "name" is used to store our name, captured by keyboard input. + name = input("What is your name warrior? ") + #randint is a great way of adding some variety to your players statistics. + HP = randint(5,20) + MP = randint(5,20) + +def villager(): + #This will create a randomly named Villager to interact with + global npcname + global response + #Below is a list, we can store lots of things in a list and then retrieve them later. + responses = ["Hi", "Are you a hero?", "Are you from this village?", "There has been a dark shadow cast across the village"] + npcnamechoice = ["Roger", "Dexter", "Sarah", "Susan"] + #Shuffle will shuffle the list contents into a random order. + shuffle(npcnamechoice) + npcname = npcnamechoice[0] + print ("\n["+npcname+":] Hello, my name is "+npcname+", Would you like to talk to me?\n") + shuffle(responses) + print ("Press y to talk to the villager") + if input() == "y": + print ("["+npcname+":] " +responses[0]) + else: + print("["+npcname+":] Goodbye") + +def enemy(): + global enemyHP + global enemyMP + global enemyname + enemyHP = randint(5,20) + enemyMP = randint(5,20) + #Below is the enemy's name, perhaps you could change this to a list and then shuffle the list, such as we did for the villager above. + enemyname = "Ogre" + print ("\nSuddenly you hear a roar, and from the shadows you see an "+enemyname+" coming straight at you....") + #print enemyname + print ("Your enemy has " + " " + str(enemyHP) + " " + "Health Points") + print ("Your enemy has " + " " + str(enemyMP) + " " + "Magic Points") + + +#We now use our functions in the game code, we call the title, the castle picture and then ask the game to run the setup for our character. +clear_screen() +title() +castle() +setup() +global name +global HP +global MP +global move +global enemyHP +print ("Welcome to the land of Narule, "+name) +#Sleep is Python's way of pausing the game for a specified number of seconds +sleep(2) +#Below we are using the helper functions to join a string of text to an integer via the str() helper. +print ("\nYour health is" + " " + str(HP)) +print ("Your magic skill is" + " " + str(MP)) + + + +print ("Would you like to venture out into the land? Press y then enter to continue") +#Below we use raw_input to ask for user input, and if it is equal to y, then the code underneath is run. +if input() == "y": + print ("You are in your home, with a roaring fireplace in front of you, above the fire you can see your sword and shield") + print ("Would you like to take your sword and shield? Press y then enter to continue") + if input() == "y": + #This is a list, and it can store many items, and to do that we "append" items to the list. + weapons = [] + weapons.append("sword") + weapons.append("shield") + print ("You are now carrying your" + " " + weapons[0] + " " + "and your" + " " + weapons[1]) + print ("Armed with your " + weapons[0] + " " + "and " + weapons[1] + " you swing open the door to your home and see a green valley gleaming in the sunshine.") + else: + print ("You choose not to take your weapons") + print ("Armed with your sense of humour, You swing open the door to see a green valley full of opportunity awaiting you.") +else: + print ("You stay at home, sat in your favourite chair watching the fire grow colder. The land of Narule no longer has a hero.") + print ("Game Over") + sys.exit(0) + +print ("In the distance to the north you can see a small village, to the east you can see a river and to the west a field of wild flowers.") + +#Remember those functions we created at the start of the code? Well here we are using them in the game. +print ("\n") +north() +east() +west() +move = input("Where would you like to go? ") +if move == 'n': + print ("\nYou move to the north, walking in the sunshine.") + print ("A villager is in your path and greets you") +#elif is short for Else If and it means that if the previous condition is false, to check this condition to see if that is true. +elif move == 'e': + print ("\nYou walk to the river which lies to the east of your home.") + print ("A villager is in your path and greets you") +elif move == 'w': + print ("\nYou walk to the field of wild flowers, stopping to take in the beauty") + print ("A villager is in your path and greets you\n") + +villager() +enemy() +sleep(3) + +fight = input("Do you wish to fight?" ) + +if fight == "y": + while HP > 0: +#This loop will only work while our characters HP is greater than 0. + hit = randint(0,5) + print ("You swing your sword and cause " + str(hit) + " of damage") + enemyHP = enemyHP - hit + print (enemyHP) + enemyhit = randint(0,5) + print ("The ogre swings a club at you and causes " + str(enemyhit) + " of damage") + HP = HP - enemyhit + print (HP) +else: + print ("You turn and run away from the ogre") + +print ("This is where this template ends, this is now YOUR world, build your adventure and share it with the world") + +print (" _ _ _") +print (" /_\ __| |_ _____ _ __ | |_ _ _ _ __ ___") +print (" //_\\ / _` \ \ / / _ \ '_ \| __| | | | '__/ _ \ ") +print ("/ _ \ (_| |\ V / __/ | | | |_| |_| | | | __/") +print ("\_/ \_/\__,_| \_/ \___|_| |_|\__|\__,_|_| \___|") + +print (" _ _") +print (" __ ___ ____ _(_) |_ ___") +print (" / _` \ \ /\ / / _` | | __/ __|") +print ("| (_| |\ V V / (_| | | |_\__ \ ") +print (" \__,_| \_/\_/ \__,_|_|\__|___/") + +print (" _ _ ___ _ _") +print ("| | | |/ _ \| | | |") +print ("| |_| | (_) | |_| |") +print (" \__, |\___/ \__,_|") +print (" |___/") From 59836bcddefd4d272a11f9986adcb4c08f23af65 Mon Sep 17 00:00:00 2001 From: Christoph Schultz Date: Wed, 11 Feb 2015 23:25:15 +0100 Subject: [PATCH 2/8] chance to win, possibility to heal and if you win to fill up health and magic skill. --- adventure.py | 59 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/adventure.py b/adventure.py index 7e5b35d..c765abf 100644 --- a/adventure.py +++ b/adventure.py @@ -47,7 +47,6 @@ def south(): def west(): print "To go west press w then enter" - def setup(): #global is used to create variables that can be used throughout our game global name @@ -90,6 +89,33 @@ def enemy(): print "Your enemy has " + " " + str(enemyHP) + " " + "Health Points" print "Your enemy has " + " " + str(enemyMP) + " " + "Magic Points" +def heal(): + global HP + global MP + global name + print name+" "+"you has " + " " + str(HP) + " " + "Health Points! do you want to consult a doctor?" + if raw_input() == "y": + print "Hello I'm Dr. Gozilla I can heal you, but i costs 3 Magicpoints, should I heal you?" + if raw_input() == "y": + HP = HP + randint(5,20) + MP = MP -3 + print "Now you are healed, your Magic Points :" + " " + str(MP) + print "your Health Points: " + str(HP) + else: + print "than you have to die!" + HP = 0 +def ranger(): + global rangername + global message + response = ["Hi", "Are you shure to walk through the forest, its dangerous!", "I never have seen you, from which country are you"] + rangernamechoice = ["George", "Fred", "Olaf", "Pit"] + shuffle(rangernamechoice) + rangername = rangernamechoice[0] + print "\nHello I am " + rangername + " Would you like to talk to with me? If yes type y\n" + if raw_input() == 'y': + shuffle(response) + message = response[0] + print message #We now use our functions in the game code, we call the title, the castle picture and then ask the game to run the setup for our character. clear_screen() @@ -137,38 +163,55 @@ def enemy(): north() east() west() +south() move = raw_input("Where would you like to go? ") if move == 'n': print "\nYou move to the north, walking in the sunshine." print "A villager is in your path and greets you" + villager() #elif is short for Else If and it means that if the previous condition is false, to check this condition to see if that is true. elif move == 'e': print "\nYou walk to the river which lies to the east of your home." print "A villager is in your path and greets you" + villager() elif move == 'w': print "\nYou walk to the field of wild flowers, stopping to take in the beauty" print "A villager is in your path and greets you\n" - -villager() + villager() +elif move == 's': + print "\nYou walk through the dangerous forest, with a lot of enemies" + print "A ranger is in your path and greets you\n" + ranger() enemy() sleep(3) fight = raw_input("Do you wish to fight?" ) if fight == "y": - while HP > 0: + while HP > 0 and enemyHP > 0: #This loop will only work while our characters HP is greater than 0. hit = randint(0,5) print "You swing your sword and cause " + str(hit) + " of damage" enemyHP = enemyHP - hit print enemyHP - enemyhit = randint(0,5) - print "The ogre swings a club at you and causes " + str(enemyhit) + " of damage" - HP = HP - enemyhit - print HP + if enemyHP <= 0: + HP = randint(5,20) + mp = randint(5,20) + print "Gratulation! You won and got" +" "+ str(mp)+" "+"Magic Points. Your Helthpoints: " + str(HP) + MP = MP +mp + print "\nyour Magicpoints: " + str(MP) +"\n" + else: + enemyhit = randint(0,5) + print "The ogre swings a club at you and causes " + str(enemyhit) + " of damage" + HP = HP - enemyhit + print HP + if HP < 1: + heal() + else: print "You turn and run away from the ogre" + print "This is where this template ends, this is now YOUR world, build your adventure and share it with the world" print " _ _ _" From d77c5dee7c73aae6862e08024108b6b2c4eb0137 Mon Sep 17 00:00:00 2001 From: Christoph Schultz Date: Sat, 25 Apr 2015 09:37:19 +0200 Subject: [PATCH 3/8] south.. --- adventure_python3.py | 53 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/adventure_python3.py b/adventure_python3.py index b953ff0..6005bca 100644 --- a/adventure_python3.py +++ b/adventure_python3.py @@ -81,16 +81,39 @@ def enemy(): global enemyHP global enemyMP global enemyname - enemyHP = randint(5,20) - enemyMP = randint(5,20) + + #Below is the enemy's name, perhaps you could change this to a list and then shuffle the list, such as we did for the villager above. - enemyname = "Ogre" + enemynamechoice = ["Ogre", "Drac"] + shuffle(enemynamechoice) + enemyname = enemynamechoice[0] + if enemyname == "Drac": + enemyHP = randint(10,30) + enemyMP = randint(8,25) + else: + enemyHP = randint(5,20) + enemyMP = randint(5,15) print ("\nSuddenly you hear a roar, and from the shadows you see an "+enemyname+" coming straight at you....") #print enemyname print ("Your enemy has " + " " + str(enemyHP) + " " + "Health Points") print ("Your enemy has " + " " + str(enemyMP) + " " + "Magic Points") - +def heal(): + global HP + global MP + print ("\nYour Helth Points are: " + str(HP) + " do you want a doctor? If you want type y") + if input() == "y": + print ("\nHello I'm Dr. Goozilla, I can heal you, but it costs 3 MP! Do you want this?") + if input() == "y" and MP > 0: + MP = MP -3 + HP = randint (5,20) + print ("\nYou are now healed! Your Health Points:" + " " + str(HP) + " " + "Your Magic Skill :" + " " + str(MP)) + else: + print ("\nI can't heal you, because your Magic Skill is too less!") + HP = 0 + else: + print ("\n so you must die!") + HP = 0 #We now use our functions in the game code, we call the title, the castle picture and then ask the game to run the setup for our character. clear_screen() title() @@ -156,16 +179,26 @@ def enemy(): fight = input("Do you wish to fight?" ) if fight == "y": - while HP > 0: + while HP > 0 and enemyHP >0: #This loop will only work while our characters HP is greater than 0. hit = randint(0,5) print ("You swing your sword and cause " + str(hit) + " of damage") enemyHP = enemyHP - hit - print (enemyHP) - enemyhit = randint(0,5) - print ("The ogre swings a club at you and causes " + str(enemyhit) + " of damage") - HP = HP - enemyhit - print (HP) + if enemyHP < 1: + mp = randint(5,20) + hp = randint(5,20) + print("\nGratulation! You won and got:" + " " + str(mp) + " " + "Magic Points and: " + " " + str(hp) + " " + "Health Points") + HP = HP + hp + MP = MP + mp + print ("\n You have:" + " " + str(HP) + " Health Points and: " + str(MP) + " Magic Points") + else: + print ("\n The enemy has " + str(enemyHP) + "Helthpoints") + enemyhit = randint(0,5) + print ("\nThe " + enemyname + " swings a club at you and causes " + str(enemyhit) + " of damage") + HP = HP - enemyhit + print ("\nYou have: " + str(HP) + "Healthpoints") + if HP < 0: + heal() else: print ("You turn and run away from the ogre") From b0c7c533cd50b8dbcf0c74cb3ff5ff24acb0e187 Mon Sep 17 00:00:00 2001 From: ChrSchultz Date: Sun, 26 Apr 2015 10:06:17 +0200 Subject: [PATCH 4/8] south, ends if no direction entered --- adventure_python3.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/adventure_python3.py b/adventure_python3.py index 6005bca..b0e4cdf 100644 --- a/adventure_python3.py +++ b/adventure_python3.py @@ -114,6 +114,9 @@ def heal(): else: print ("\n so you must die!") HP = 0 + + def move(): + #We now use our functions in the game code, we call the title, the castle picture and then ask the game to run the setup for our character. clear_screen() title() @@ -159,19 +162,25 @@ def heal(): print ("\n") north() east() +south() west() -move = input("Where would you like to go? ") -if move == 'n': +m = input("Where would you like to go? ") +if m == 'n': print ("\nYou move to the north, walking in the sunshine.") print ("A villager is in your path and greets you") #elif is short for Else If and it means that if the previous condition is false, to check this condition to see if that is true. -elif move == 'e': +elif m == 'e': print ("\nYou walk to the river which lies to the east of your home.") print ("A villager is in your path and greets you") -elif move == 'w': +elif m == 'w': print ("\nYou walk to the field of wild flowers, stopping to take in the beauty") print ("A villager is in your path and greets you\n") - +elif m == 's': + print ("\nYou walk in too a deep and dark forest, and you are a little bit angshious") + print ("\A villagert is in your path and greets you\n") +else + print ("\n You are staying here! The game ends.") + sys.exit(0) villager() enemy() sleep(3) From 435e36991e2da29964cc8af1f1dcb5c73c4478c6 Mon Sep 17 00:00:00 2001 From: ChrSchultz Date: Sun, 26 Apr 2015 10:20:29 +0200 Subject: [PATCH 5/8] 'corrections' --- adventure_python3.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/adventure_python3.py b/adventure_python3.py index b0e4cdf..6c5a5bb 100644 --- a/adventure_python3.py +++ b/adventure_python3.py @@ -115,8 +115,6 @@ def heal(): print ("\n so you must die!") HP = 0 - def move(): - #We now use our functions in the game code, we call the title, the castle picture and then ask the game to run the setup for our character. clear_screen() title() From c5e36f1123d5c7f68f51ce2a193550cdeaa34ac8 Mon Sep 17 00:00:00 2001 From: Christoph Schultz Date: Sat, 25 Apr 2015 10:30:09 +0200 Subject: [PATCH 6/8] many corr. --- adventure_python3.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adventure_python3.py b/adventure_python3.py index 6c5a5bb..69c5399 100644 --- a/adventure_python3.py +++ b/adventure_python3.py @@ -175,10 +175,10 @@ def heal(): print ("A villager is in your path and greets you\n") elif m == 's': print ("\nYou walk in too a deep and dark forest, and you are a little bit angshious") - print ("\A villagert is in your path and greets you\n") -else - print ("\n You are staying here! The game ends.") - sys.exit(0) + print ("\A villagert is in your path and greets you\n") +else: + print ("\n You are staying here! The game ends.") + sys.exit(0) villager() enemy() sleep(3) From dcee8163fe7caec52dd734b58fdd6b1a78b16ef6 Mon Sep 17 00:00:00 2001 From: Christoph Schultz Date: Sun, 26 Apr 2015 16:59:07 +0200 Subject: [PATCH 7/8] south and migration to p3 --- adventure.py | 61 +++++++-- adventure_python3.py | 287 +++++++++++++++++++++++++------------------ 2 files changed, 218 insertions(+), 130 deletions(-) diff --git a/adventure.py b/adventure.py index c765abf..5fae425 100644 --- a/adventure.py +++ b/adventure.py @@ -1,3 +1,4 @@ + __author__ = 'Les Pounder' #The lines below import modules of code into our game, in particular these import time functions to allow us to pause and stop the game, and random provides a method of choosing random numbers or characters. @@ -80,11 +81,22 @@ def enemy(): global enemyHP global enemyMP global enemyname - enemyHP = randint(5,20) - enemyMP = randint(5,20) - #Below is the enemy's name, perhaps you could change this to a list and then shuffle the list, such as we did for the villager above. - enemyname = "Ogre" - print "\nSuddenly you hear a roar, and from the shadows you see an "+enemyname+" coming straight at you...." + global i + max = [20,5,10] + min = [5,1,3] + #Below a list,with the names of the enemies. we will shuffle that you'll get one of these. + enemynamechoice =["Ogre","Ghost","Drac"] + shuffle(enemynamechoice) + enemyname=enemynamechoice[0] + if enemyname == "Ogre": + i = 0 + elif enemyname == "Drac": + i = 2 + else: + i =1 + enemyHP = randint(min[i],max[i]) + enemyMP = randint(min[i],max[i]) + print " you hear a roar, and from the shadows you see an "+enemyname+" coming straight at you...." #print enemyname print "Your enemy has " + " " + str(enemyHP) + " " + "Health Points" print "Your enemy has " + " " + str(enemyMP) + " " + "Magic Points" @@ -181,13 +193,40 @@ def ranger(): elif move == 's': print "\nYou walk through the dangerous forest, with a lot of enemies" print "A ranger is in your path and greets you\n" + enemies = randint(1,5) ranger() -enemy() -sleep(3) - -fight = raw_input("Do you wish to fight?" ) + print "you have " + str(enemies) + " enemies" + while enemies > 0: + enemy() + fight= raw_input("Do you want to fight?") + if fight == "y": + while HP > 0 and enemyHP > 0: +#This loop will only work while our characters HP is greater than 0. + hit = randint(0,5) + print "You swing your sword and cause " + str(hit) + " of damage" + enemyHP = enemyHP - hit + print enemyHP + if enemyHP <= 0: + HP = randint(5,20) + mp = randint(5,20) + print "Gratulation! You won and got" +" "+ str(mp)+" "+"Magic Points. Your Helthpoints: " + str(HP) + MP = MP +mp + print "\nyour Magicpoints: " + str(MP) +"\n" + enemies -= 1 + else: + enemyhit = randint(0,5) + print "The ogre swings a club at you and causes " + str(enemyhit) + " of damage" + HP = HP - enemyhit + print HP + if HP < 1: + heal() + else: + print "\nYou run away from the " + enemyname + "." + sys.exit(0) +if move != 's': + fight = raw_input("\nDo you wish to fight?" ) -if fight == "y": + if fight == "y": while HP > 0 and enemyHP > 0: #This loop will only work while our characters HP is greater than 0. hit = randint(0,5) @@ -208,7 +247,7 @@ def ranger(): if HP < 1: heal() -else: + else: print "You turn and run away from the ogre" diff --git a/adventure_python3.py b/adventure_python3.py index 69c5399..4ea01fd 100644 --- a/adventure_python3.py +++ b/adventure_python3.py @@ -1,3 +1,4 @@ + __author__ = 'Les Pounder' #The lines below import modules of code into our game, in particular these import time functions to allow us to pause and stop the game, and random provides a method of choosing random numbers or characters. @@ -12,11 +13,11 @@ def clear_screen(): #Simple function that clears the screen os.system('cls' if os.name=='nt' else 'clear') def title(): - print (" __ _ __ ") - print (" / / ___ __ _ ___ _ __ __| | ___ / _| /\ /\___ _ __ ___ ___ ___ ") - print (" / / / _ \/ _` |/ _ \ '_ \ / _` | / _ \| |_ / /_/ / _ \ '__/ _ \ / _ \/ __|") - print ("/ /__| __/ (_| | __/ | | | (_| | | (_) | _| / __ / __/ | | (_) | __/\__ \ ") - print ("\____/\___|\__, |\___|_| |_|\__,_| \___/|_| \/ /_/ \___|_| \___/ \___||___/") + print " __ _ __ " + print " / / ___ __ _ ___ _ __ __| | ___ / _| /\ /\___ _ __ ___ ___ ___ " + print " / / / _ \/ _` |/ _ \ '_ \ / _` | / _ \| |_ / /_/ / _ \ '__/ _ \ / _ \/ __|" + print "/ /__| __/ (_| | __/ | | | (_| | | (_) | _| / __ / __/ | | (_) | __/\__ \ " + print "\____/\___|\__, |\___|_| |_|\__,_| \___/|_| \/ /_/ \___|_| \___/ \___||___/" def castle(): print ("* |>>> + ") @@ -39,14 +40,20 @@ def castle(): print (" ||: . ||: , +++++++ . . ||: |") def north(): - print ("To go north press n then enter") + + print "To go north press n then enter" + def east(): - print ("To go east press e then enter") + + print "To go east press e then enter" + def south(): - print ("to go south press s then enter") + + print "to go south press s then enter" + def west(): - print ("To go west press w then enter") + print "To go west press w then enter" def setup(): #global is used to create variables that can be used throughout our game @@ -54,7 +61,7 @@ def setup(): global HP global MP #Our variable "name" is used to store our name, captured by keyboard input. - name = input("What is your name warrior? ") + name = raw_input("What is your name warrior? ") #randint is a great way of adding some variety to your players statistics. HP = randint(5,20) MP = randint(5,20) @@ -69,11 +76,11 @@ def villager(): #Shuffle will shuffle the list contents into a random order. shuffle(npcnamechoice) npcname = npcnamechoice[0] - print ("\n["+npcname+":] Hello, my name is "+npcname+", Would you like to talk to me?\n") + print "\n["+npcname+":] Hello, my name is "+npcname+", Would you like to talk to me?\n" shuffle(responses) - print ("Press y to talk to the villager") - if input() == "y": - print ("["+npcname+":] " +responses[0]) + print "Press y to talk to the villager" + if raw_input() == "y": + print "["+npcname+":] " +responses[0] else: print("["+npcname+":] Goodbye") @@ -81,40 +88,54 @@ def enemy(): global enemyHP global enemyMP global enemyname - - - #Below is the enemy's name, perhaps you could change this to a list and then shuffle the list, such as we did for the villager above. - enemynamechoice = ["Ogre", "Drac"] + global i + max = [20,5,10] + min = [5,1,3] + #Below a list,with the names of the enemies. we will shuffle that you'll get one of these. + enemynamechoice =["Ogre","Ghost","Drac"] shuffle(enemynamechoice) - enemyname = enemynamechoice[0] - if enemyname == "Drac": - enemyHP = randint(10,30) - enemyMP = randint(8,25) + enemyname=enemynamechoice[0] + if enemyname == "Ogre": + i = 0 + elif enemyname == "Drac": + i = 2 else: - enemyHP = randint(5,20) - enemyMP = randint(5,15) - print ("\nSuddenly you hear a roar, and from the shadows you see an "+enemyname+" coming straight at you....") + i =1 + enemyHP = randint(min[i],max[i]) + enemyMP = randint(min[i],max[i]) + print " you hear a roar, and from the shadows you see an "+enemyname+" coming straight at you...." #print enemyname - print ("Your enemy has " + " " + str(enemyHP) + " " + "Health Points") - print ("Your enemy has " + " " + str(enemyMP) + " " + "Magic Points") + print "Your enemy has " + " " + str(enemyHP) + " " + "Health Points" + print "Your enemy has " + " " + str(enemyMP) + " " + "Magic Points" def heal(): - global HP + global HP global MP - print ("\nYour Helth Points are: " + str(HP) + " do you want a doctor? If you want type y") - if input() == "y": - print ("\nHello I'm Dr. Goozilla, I can heal you, but it costs 3 MP! Do you want this?") - if input() == "y" and MP > 0: - MP = MP -3 - HP = randint (5,20) - print ("\nYou are now healed! Your Health Points:" + " " + str(HP) + " " + "Your Magic Skill :" + " " + str(MP)) - else: - print ("\nI can't heal you, because your Magic Skill is too less!") - HP = 0 - else: - print ("\n so you must die!") + global name + print name+" "+"you has " + " " + str(HP) + " " + "Health Points! do you want to consult a doctor?" + if raw_input() == "y": + print "Hello I'm Dr. Gozilla I can heal you, but i costs 3 Magicpoints, should I heal you?" + if raw_input() == "y": + HP = HP + randint(5,20) + MP = MP -3 + print "Now you are healed, your Magic Points :" + " " + str(MP) + print "your Health Points: " + str(HP) + else: + print "than you have to die!" HP = 0 - +def ranger(): + global rangername + global message + response = ["Hi", "Are you shure to walk through the forest, its dangerous!", "I never have seen you, from which country are you"] + rangernamechoice = ["George", "Fred", "Olaf", "Pit"] + shuffle(rangernamechoice) + rangername = rangernamechoice[0] + print "\nHello I am " + rangername + " Would you like to talk to with me? If yes type y\n" + if raw_input() == 'y': + shuffle(response) + message = response[0] + print message + #We now use our functions in the game code, we call the title, the castle picture and then ask the game to run the setup for our character. clear_screen() title() @@ -125,106 +146,134 @@ def heal(): global MP global move global enemyHP -print ("Welcome to the land of Narule, "+name) +print "Welcome to the land of Narule, " + name #Sleep is Python's way of pausing the game for a specified number of seconds sleep(2) #Below we are using the helper functions to join a string of text to an integer via the str() helper. -print ("\nYour health is" + " " + str(HP)) -print ("Your magic skill is" + " " + str(MP)) +print "\nYour health is" + " " + str(HP) +print "Your magic skill is" + " " + str(MP) -print ("Would you like to venture out into the land? Press y then enter to continue") +print "Would you like to venture out into the land? Press y then enter to continue" #Below we use raw_input to ask for user input, and if it is equal to y, then the code underneath is run. -if input() == "y": - print ("You are in your home, with a roaring fireplace in front of you, above the fire you can see your sword and shield") - print ("Would you like to take your sword and shield? Press y then enter to continue") - if input() == "y": +if raw_input() == "y": + print "You are in your home, with a roaring fireplace in front of you, above the fire you can see your sword and shield" + print "Would you like to take your sword and shield? Press y then enter to continue" + if raw_input() == "y": #This is a list, and it can store many items, and to do that we "append" items to the list. weapons = [] weapons.append("sword") weapons.append("shield") - print ("You are now carrying your" + " " + weapons[0] + " " + "and your" + " " + weapons[1]) - print ("Armed with your " + weapons[0] + " " + "and " + weapons[1] + " you swing open the door to your home and see a green valley gleaming in the sunshine.") + print "You are now carrying your" + " " + weapons[0] + " " + "and your" + " " + weapons[1] + print "Armed with your " + weapons[0] + " " + "and " + weapons[1] + " you swing open the door to your home and see a green valley gleaming in the sunshine." else: - print ("You choose not to take your weapons") - print ("Armed with your sense of humour, You swing open the door to see a green valley full of opportunity awaiting you.") + print "You choose not to take your weapons" + print "Armed with your sense of humour, You swing open the door to see a green valley full of opportunity awaiting you." else: - print ("You stay at home, sat in your favourite chair watching the fire grow colder. The land of Narule no longer has a hero.") - print ("Game Over") + print "You stay at home, sat in your favourite chair watching the fire grow colder. The land of Narule no longer has a hero." + print "Game Over" sys.exit(0) -print ("In the distance to the north you can see a small village, to the east you can see a river and to the west a field of wild flowers.") +print "In the distance to the north you can see a small village, to the east you can see a river and to the west a field of wild flowers." #Remember those functions we created at the start of the code? Well here we are using them in the game. -print ("\n") +print "\n" north() east() -south() west() -m = input("Where would you like to go? ") -if m == 'n': - print ("\nYou move to the north, walking in the sunshine.") - print ("A villager is in your path and greets you") +south() +move = raw_input("Where would you like to go? ") +if move == 'n': + print "\nYou move to the north, walking in the sunshine." + print "A villager is in your path and greets you" + villager() #elif is short for Else If and it means that if the previous condition is false, to check this condition to see if that is true. -elif m == 'e': - print ("\nYou walk to the river which lies to the east of your home.") - print ("A villager is in your path and greets you") -elif m == 'w': - print ("\nYou walk to the field of wild flowers, stopping to take in the beauty") - print ("A villager is in your path and greets you\n") -elif m == 's': - print ("\nYou walk in too a deep and dark forest, and you are a little bit angshious") - print ("\A villagert is in your path and greets you\n") -else: - print ("\n You are staying here! The game ends.") - sys.exit(0) -villager() -enemy() -sleep(3) - -fight = input("Do you wish to fight?" ) +elif move == 'e': + print "\nYou walk to the river which lies to the east of your home." + print "A villager is in your path and greets you" + villager() +elif move == 'w': + print "\nYou walk to the field of wild flowers, stopping to take in the beauty" + print "A villager is in your path and greets you\n" + villager() +elif move == 's': + print "\nYou walk through the dangerous forest, with a lot of enemies" + print "A ranger is in your path and greets you\n" + enemies = randint(1,5) + ranger() + print "you have " + str(enemies) + " enemies" + while enemies > 0: + enemy() + fight= raw_input("Do you want to fight?") + if fight == "y": + while HP > 0 and enemyHP > 0: +#This loop will only work while our characters HP is greater than 0. + hit = randint(0,5) + print "You swing your sword and cause " + str(hit) + " of damage" + enemyHP = enemyHP - hit + print enemyHP + if enemyHP <= 0: + HP = randint(5,20) + mp = randint(5,20) + print "Gratulation! You won and got" +" "+ str(mp)+" "+"Magic Points. Your Helthpoints: " + str(HP) + MP = MP +mp + print "\nyour Magicpoints: " + str(MP) +"\n" + enemies -= 1 + else: + enemyhit = randint(0,5) + print "The ogre swings a club at you and causes " + str(enemyhit) + " of damage" + HP = HP - enemyhit + print HP + if HP < 1: + heal() + else: + print "\nYou run away from the " + enemyname + "." + sys.exit(0) +if move != 's': + fight = raw_input("\nDo you wish to fight?" ) -if fight == "y": - while HP > 0 and enemyHP >0: + if fight == "y": + while HP > 0 and enemyHP > 0: #This loop will only work while our characters HP is greater than 0. hit = randint(0,5) - print ("You swing your sword and cause " + str(hit) + " of damage") + print "You swing your sword and cause " + str(hit) + " of damage" enemyHP = enemyHP - hit - if enemyHP < 1: - mp = randint(5,20) - hp = randint(5,20) - print("\nGratulation! You won and got:" + " " + str(mp) + " " + "Magic Points and: " + " " + str(hp) + " " + "Health Points") - HP = HP + hp - MP = MP + mp - print ("\n You have:" + " " + str(HP) + " Health Points and: " + str(MP) + " Magic Points") - else: - print ("\n The enemy has " + str(enemyHP) + "Helthpoints") - enemyhit = randint(0,5) - print ("\nThe " + enemyname + " swings a club at you and causes " + str(enemyhit) + " of damage") - HP = HP - enemyhit - print ("\nYou have: " + str(HP) + "Healthpoints") - if HP < 0: - heal() -else: - print ("You turn and run away from the ogre") - -print ("This is where this template ends, this is now YOUR world, build your adventure and share it with the world") - -print (" _ _ _") -print (" /_\ __| |_ _____ _ __ | |_ _ _ _ __ ___") -print (" //_\\ / _` \ \ / / _ \ '_ \| __| | | | '__/ _ \ ") -print ("/ _ \ (_| |\ V / __/ | | | |_| |_| | | | __/") -print ("\_/ \_/\__,_| \_/ \___|_| |_|\__|\__,_|_| \___|") - -print (" _ _") -print (" __ ___ ____ _(_) |_ ___") -print (" / _` \ \ /\ / / _` | | __/ __|") -print ("| (_| |\ V V / (_| | | |_\__ \ ") -print (" \__,_| \_/\_/ \__,_|_|\__|___/") - -print (" _ _ ___ _ _") -print ("| | | |/ _ \| | | |") -print ("| |_| | (_) | |_| |") -print (" \__, |\___/ \__,_|") -print (" |___/") + print enemyHP + if enemyHP <= 0: + HP = randint(5,20) + mp = randint(5,20) + print "Gratulation! You won and got" +" "+ str(mp)+" "+"Magic Points. Your Helthpoints: " + str(HP) + MP = MP +mp + print "\nyour Magicpoints: " + str(MP) +"\n" + else: + enemyhit = randint(0,5) + print "The ogre swings a club at you and causes " + str(enemyhit) + " of damage" + HP = HP - enemyhit + print HP + if HP < 1: + heal() + + else: + print "You turn and run away from the ogre" + + +print "This is where this template ends, this is now YOUR world, build your adventure and share it with the world" + +print " _ _ _" +print " /_\ __| |_ _____ _ __ | |_ _ _ _ __ ___" +print " //_\\ / _` \ \ / / _ \ '_ \| __| | | | '__/ _ \ " +print "/ _ \ (_| |\ V / __/ | | | |_| |_| | | | __/" +print "\_/ \_/\__,_| \_/ \___|_| |_|\__|\__,_|_| \___|" + +print " _ _" +print " __ ___ ____ _(_) |_ ___" +print " / _` \ \ /\ / / _` | | __/ __|" +print "| (_| |\ V V / (_| | | |_\__ \ " +print " \__,_| \_/\_/ \__,_|_|\__|___/" + +print " _ _ ___ _ _" +print "| | | |/ _ \| | | |" +print "| |_| | (_) | |_| |" +print " \__, |\___/ \__,_|" +print " |___/" From f653bde4c30bf224e7fb3fe89dc563524ccb6987 Mon Sep 17 00:00:00 2001 From: Christoph Schultz Date: Sun, 26 Apr 2015 17:42:33 +0200 Subject: [PATCH 8/8] python3 migration --- adventure_python3.py | 194 ++++++++++++++++++++++--------------------- 1 file changed, 98 insertions(+), 96 deletions(-) diff --git a/adventure_python3.py b/adventure_python3.py index 4ea01fd..eb5342d 100644 --- a/adventure_python3.py +++ b/adventure_python3.py @@ -1,4 +1,4 @@ - +# __author__ = 'Les Pounder' #The lines below import modules of code into our game, in particular these import time functions to allow us to pause and stop the game, and random provides a method of choosing random numbers or characters. @@ -13,11 +13,13 @@ def clear_screen(): #Simple function that clears the screen os.system('cls' if os.name=='nt' else 'clear') def title(): - print " __ _ __ " - print " / / ___ __ _ ___ _ __ __| | ___ / _| /\ /\___ _ __ ___ ___ ___ " - print " / / / _ \/ _` |/ _ \ '_ \ / _` | / _ \| |_ / /_/ / _ \ '__/ _ \ / _ \/ __|" - print "/ /__| __/ (_| | __/ | | | (_| | | (_) | _| / __ / __/ | | (_) | __/\__ \ " - print "\____/\___|\__, |\___|_| |_|\__,_| \___/|_| \/ /_/ \___|_| \___/ \___||___/" + + print (" __ _ __ ") + print (" / / ___ __ _ ___ _ __ __| | ___ / _| /\ /\___ _ __ ___ ___ ___ ") + print (" / / / _ \/ _` |/ _ \ '_ \ / _` | / _ \| |_ / /_/ / _ \ '__/ _ \ / _ \/ __|") + print ("/ /__| __/ (_| | __/ | | | (_| | | (_) | _| / __ / __/ | | (_) | __/\__ \ ") + print ("\____/\___|\__, |\___|_| |_|\__,_| \___/|_| \/ /_/ \___|_| \___/ \___||___/") + def castle(): print ("* |>>> + ") @@ -41,19 +43,19 @@ def castle(): def north(): - print "To go north press n then enter" + print("To go north press n") def east(): - print "To go east press e then enter" + print("To go east press e") def south(): - print "to go south press s then enter" + print("to go south press s then enter") def west(): - print "To go west press w then enter" + print("To go west press w then enter") def setup(): #global is used to create variables that can be used throughout our game @@ -61,7 +63,7 @@ def setup(): global HP global MP #Our variable "name" is used to store our name, captured by keyboard input. - name = raw_input("What is your name warrior? ") + name = input("What is your name warrior? ") #randint is a great way of adding some variety to your players statistics. HP = randint(5,20) MP = randint(5,20) @@ -76,13 +78,13 @@ def villager(): #Shuffle will shuffle the list contents into a random order. shuffle(npcnamechoice) npcname = npcnamechoice[0] - print "\n["+npcname+":] Hello, my name is "+npcname+", Would you like to talk to me?\n" + print("\n["+npcname+":] Hello, my name is "+npcname+", Would you like to talk to me?\n") shuffle(responses) - print "Press y to talk to the villager" - if raw_input() == "y": - print "["+npcname+":] " +responses[0] + print("Press y to talk to the villager") + if input() == "y": + print("["+npcname+":] " +responses[0]) else: - print("["+npcname+":] Goodbye") + print(("["+npcname+":] Goodbye")) def enemy(): global enemyHP @@ -103,25 +105,25 @@ def enemy(): i =1 enemyHP = randint(min[i],max[i]) enemyMP = randint(min[i],max[i]) - print " you hear a roar, and from the shadows you see an "+enemyname+" coming straight at you...." + print(" you hear a roar, and from the shadows you see an "+enemyname+" coming straight at you....") #print enemyname - print "Your enemy has " + " " + str(enemyHP) + " " + "Health Points" - print "Your enemy has " + " " + str(enemyMP) + " " + "Magic Points" + print("Your enemy has " + " " + str(enemyHP) + " " + "Health Points") + print("Your enemy has " + " " + str(enemyMP) + " " + "Magic Points") def heal(): global HP global MP global name - print name+" "+"you has " + " " + str(HP) + " " + "Health Points! do you want to consult a doctor?" - if raw_input() == "y": - print "Hello I'm Dr. Gozilla I can heal you, but i costs 3 Magicpoints, should I heal you?" - if raw_input() == "y": + print(name+" "+"you has " + " " + str(HP) + " " + "Health Points! do you want to consult a doctor?") + if input() == "y": + print("Hello I'm Dr. Gozilla I can heal you, but i costs 3 Magicpoints, should I heal you?") + if input() == "y": HP = HP + randint(5,20) MP = MP -3 - print "Now you are healed, your Magic Points :" + " " + str(MP) - print "your Health Points: " + str(HP) - else: - print "than you have to die!" + print("Now you are healed, your Magic Points :" + " " + str(MP)) + print("your Health Points: " + str(HP)) + else: + print("than you have to die!") HP = 0 def ranger(): global rangername @@ -130,11 +132,11 @@ def ranger(): rangernamechoice = ["George", "Fred", "Olaf", "Pit"] shuffle(rangernamechoice) rangername = rangernamechoice[0] - print "\nHello I am " + rangername + " Would you like to talk to with me? If yes type y\n" - if raw_input() == 'y': + print("\nHello I am " + rangername + " Would you like to talk to with me? If yes type y\n") + if input() == 'y': shuffle(response) message = response[0] - print message + print(message) #We now use our functions in the game code, we call the title, the castle picture and then ask the game to run the setup for our character. clear_screen() @@ -146,134 +148,134 @@ def ranger(): global MP global move global enemyHP -print "Welcome to the land of Narule, " + name +print("Welcome to the land of Narule, " + name) #Sleep is Python's way of pausing the game for a specified number of seconds sleep(2) #Below we are using the helper functions to join a string of text to an integer via the str() helper. -print "\nYour health is" + " " + str(HP) -print "Your magic skill is" + " " + str(MP) +print("\nYour health is" + " " + str(HP)) +print("Your magic skill is" + " " + str(MP)) -print "Would you like to venture out into the land? Press y then enter to continue" +print("Would you like to venture out into the land? Press y then enter to continue") #Below we use raw_input to ask for user input, and if it is equal to y, then the code underneath is run. -if raw_input() == "y": - print "You are in your home, with a roaring fireplace in front of you, above the fire you can see your sword and shield" - print "Would you like to take your sword and shield? Press y then enter to continue" - if raw_input() == "y": - #This is a list, and it can store many items, and to do that we "append" items to the list. +if input() == "y": + print("You are in your home, with a roaring fireplace in front of you, above the fire you can see your sword and shield") + print("Would you like to take your sword and shield? Press y then enter to continue") + if input() == "y": + #This is a list, and it can store many items, and to do that we "append" items to the list. weapons = [] weapons.append("sword") weapons.append("shield") - print "You are now carrying your" + " " + weapons[0] + " " + "and your" + " " + weapons[1] - print "Armed with your " + weapons[0] + " " + "and " + weapons[1] + " you swing open the door to your home and see a green valley gleaming in the sunshine." + print("You are now carrying your" + " " + weapons[0] + " " + "and your" + " " + weapons[1]) + print("Armed with your " + weapons[0] + " " + "and " + weapons[1] + " you swing open the door to your home and see a green valley gleaming in the sunshine.") else: - print "You choose not to take your weapons" - print "Armed with your sense of humour, You swing open the door to see a green valley full of opportunity awaiting you." + print("You choose not to take your weapons") + print("Armed with your sense of humour, You swing open the door to see a green valley full of opportunity awaiting you.") else: - print "You stay at home, sat in your favourite chair watching the fire grow colder. The land of Narule no longer has a hero." - print "Game Over" + print("You stay at home, sat in your favourite chair watching the fire grow colder. The land of Narule no longer has a hero.") + print("Game Over") sys.exit(0) -print "In the distance to the north you can see a small village, to the east you can see a river and to the west a field of wild flowers." +print("In the distance to the north you can see a small village, to the east you can see a river and to the west a field of wild flowers.") #Remember those functions we created at the start of the code? Well here we are using them in the game. -print "\n" +print("\n") north() east() west() south() -move = raw_input("Where would you like to go? ") +move = input("Where would you like to go? ") if move == 'n': - print "\nYou move to the north, walking in the sunshine." - print "A villager is in your path and greets you" + print("\nYou move to the north, walking in the sunshine.") + print("A villager is in your path and greets you") villager() #elif is short for Else If and it means that if the previous condition is false, to check this condition to see if that is true. elif move == 'e': - print "\nYou walk to the river which lies to the east of your home." - print "A villager is in your path and greets you" + print("\nYou walk to the river which lies to the east of your home.") + print("A villager is in your path and greets you") villager() elif move == 'w': - print "\nYou walk to the field of wild flowers, stopping to take in the beauty" - print "A villager is in your path and greets you\n" + print("\nYou walk to the field of wild flowers, stopping to take in the beauty") + print("A villager is in your path and greets you\n") villager() elif move == 's': - print "\nYou walk through the dangerous forest, with a lot of enemies" - print "A ranger is in your path and greets you\n" + print("\nYou walk through the dangerous forest, with a lot of enemies") + print("A ranger is in your path and greets you\n") enemies = randint(1,5) ranger() - print "you have " + str(enemies) + " enemies" + print("you have " + str(enemies) + " enemies") while enemies > 0: enemy() - fight= raw_input("Do you want to fight?") + fight= input("Do you want to fight?") if fight == "y": while HP > 0 and enemyHP > 0: #This loop will only work while our characters HP is greater than 0. hit = randint(0,5) - print "You swing your sword and cause " + str(hit) + " of damage" + print("You swing your sword and cause " + str(hit) + " of damage") enemyHP = enemyHP - hit - print enemyHP + print(enemyHP) if enemyHP <= 0: HP = randint(5,20) mp = randint(5,20) - print "Gratulation! You won and got" +" "+ str(mp)+" "+"Magic Points. Your Helthpoints: " + str(HP) + print("Gratulation! You won and got" +" "+ str(mp)+" "+"Magic Points. Your Helthpoints: " + str(HP)) MP = MP +mp - print "\nyour Magicpoints: " + str(MP) +"\n" + print("\nyour Magicpoints: " + str(MP) +"\n") enemies -= 1 else: enemyhit = randint(0,5) - print "The ogre swings a club at you and causes " + str(enemyhit) + " of damage" + print("The ogre swings a club at you and causes " + str(enemyhit) + " of damage") HP = HP - enemyhit - print HP + print(HP) if HP < 1: heal() else: - print "\nYou run away from the " + enemyname + "." + print("\nYou run away from the " + enemyname + ".") sys.exit(0) if move != 's': - fight = raw_input("\nDo you wish to fight?" ) + fight = input("\nDo you wish to fight?" ) if fight == "y": while HP > 0 and enemyHP > 0: #This loop will only work while our characters HP is greater than 0. hit = randint(0,5) - print "You swing your sword and cause " + str(hit) + " of damage" + print("You swing your sword and cause " + str(hit) + " of damage") enemyHP = enemyHP - hit - print enemyHP + print(enemyHP) if enemyHP <= 0: HP = randint(5,20) - mp = randint(5,20) - print "Gratulation! You won and got" +" "+ str(mp)+" "+"Magic Points. Your Helthpoints: " + str(HP) - MP = MP +mp - print "\nyour Magicpoints: " + str(MP) +"\n" - else: - enemyhit = randint(0,5) - print "The ogre swings a club at you and causes " + str(enemyhit) + " of damage" - HP = HP - enemyhit - print HP - if HP < 1: - heal() + mp = randint(5,20) + print("Gratulation! You won and got" +" "+ str(mp)+" "+"Magic Points. Your Helthpoints: " + str(HP)) + MP = MP +mp + print("\nyour Magicpoints: " + str(MP) +"\n") + else: + enemyhit = randint(0,5) + print("The ogre swings a club at you and causes " + str(enemyhit) + " of damage") + HP = HP - enemyhit + print(HP) + if HP < 1: + heal() else: - print "You turn and run away from the ogre" + print("You turn and run away from the ogre") -print "This is where this template ends, this is now YOUR world, build your adventure and share it with the world" +print("This is where this template ends, this is now YOUR world, build your adventure and share it with the world") -print " _ _ _" -print " /_\ __| |_ _____ _ __ | |_ _ _ _ __ ___" -print " //_\\ / _` \ \ / / _ \ '_ \| __| | | | '__/ _ \ " -print "/ _ \ (_| |\ V / __/ | | | |_| |_| | | | __/" -print "\_/ \_/\__,_| \_/ \___|_| |_|\__|\__,_|_| \___|" +print(" _ _ _") +print(" /_\ __| |_ _____ _ __ | |_ _ _ _ __ ___") +print(" //_\\ / _` \ \ / / _ \ '_ \| __| | | | '__/ _ \ ") +print("/ _ \ (_| |\ V / __/ | | | |_| |_| | | | __/") +print("\_/ \_/\__,_| \_/ \___|_| |_|\__|\__,_|_| \___|") -print " _ _" -print " __ ___ ____ _(_) |_ ___" -print " / _` \ \ /\ / / _` | | __/ __|" -print "| (_| |\ V V / (_| | | |_\__ \ " -print " \__,_| \_/\_/ \__,_|_|\__|___/" +print(" _ _") +print(" __ ___ ____ _(_) |_ ___") +print(" / _` \ \ /\ / / _` | | __/ __|") +print("| (_| |\ V V / (_| | | |_\__ \ ") +print(" \__,_| \_/\_/ \__,_|_|\__|___/") -print " _ _ ___ _ _" -print "| | | |/ _ \| | | |" -print "| |_| | (_) | |_| |" -print " \__, |\___/ \__,_|" -print " |___/" +print(" _ _ ___ _ _") +print("| | | |/ _ \| | | |") +print("| |_| | (_) | |_| |") +print(" \__, |\___/ \__,_|") +print(" |___/")