Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Python by (47.6k points)

I'm a gamer who decided he wanted to make some basic games others could play. I'm very new to coding and have the most basic understanding of it. My cousin and I are trying to make a text-based game in Python 3.6.0. We have searched the internet for answers to our problem but cannot find anything. Code is below:

def start ():

print ''' Welcome to the game! Created by Meme Buddha type 'start' to begin''' 

print 

prompt_sta ()

def prompt_sta ():

prompt_0 = input ('Type a Command, ')

try:

if prompt_0 == 'Start':

outside_house ()

elif prompt_0 == 'Begin':

print 'You need to drink bleach and look at spicy memes!'

print

prompt_sta ()

else:

print 'Type Start, throw it on him, not me, ugh, lets try something else!'

print

prompt_sta ()

except ValueError:

print 'Type Start, throw it on him, not me, ugh, lets try something else!'

print

prompt_sta ()

start ()

When trying to run the module to test it, we get an error which says:

"Missing parentheses in call to 'print'"

Since we have such basic knowledge of coding, and couldn't find answers on google, we were hoping that someone could help fix this most likely, simple error.

1 Answer

0 votes
by (106k points)

To get rid of this syntax error the print "statement" in Python 3.x is a function that uses parenthesis so:

print "Hello world" # python 2.x

Is now

print("Hello world") # python 3.x

To know more about this you can have a look at the following video tutorial:-

Related questions

0 votes
1 answer
0 votes
1 answer
asked Oct 4, 2019 in Python by Tech4ever (20.3k points)
0 votes
1 answer

Browse Categories

...