Help me for this project
Help me for this project Animal Trivia
#hi#
####hello####
I think you should do a different approach, but if you really want to do recursion you can but I don't know how to fix this :/
Hey! So in your code, it says
print('answer correct')
This is the format for python 2. For python 3, you do ". Heres a example...
print("Hello World!") #this is python 3
print('Hello World!') #this is python 2
I see a few more errors but this should be a good start for everything else. You mixed python 2 with 3 in a few parts so look carefully.
If you have any other questions, add me to the doc and I'll help you with it
Thanks,
CodeMaster007
@CodeMaster007 Thanks
@CodeMaster007 and this:File "main.py", line 9
if attempt < 2
^
SyntaxError: invalid syntax
You have too large of a space. Like a tab on the keyboard . Click backspace till its just one ahead. @pikachu223
@pikachu223 if attempt < 2:
you need a ":"
@CodeMaster007 no, both work in 3
Ok. So maybe hello world works in 3 but other commands do not. There is a reason why there are 2 different pythons. Python 2 and 3. @doineednumbers
@CodeMaster007 There's also a reason why they're both python. I think you're thinking of the difference between print "hi"
and print("hi")
Yep! :) @doineednumbers
I fixed the errors: https://replit.com/@ZarmDev/Animal-Trivia#main.py But your code is confusing and doesn't seem to work.
Your code also repeats forever, and when the function is called, you need to add arguments, possibly do this a different way or find some solution?