Aaliyah Bishop
@AaliyahBishop
I gets money.PERIODDDD!!!!!!!!!!!!!
Im looking for an answer to fix my invalid syntax. Any suggestion? This is my code
Python
This is my third attempt of making a program for an interactive coin toss game but dont know why there's a syntax error in line 17. Any suggestions?
Python
AtriDey if (recordlist.count("Tails"))) > 3:
Found your problem. Replace it with:
if (recordlist.count("Tails")) > 3):
You seem to have put the > 3 outside of the parentheses. You have the same mistake in line 19 as well. If this helped you, then please press the green checkmark to the left to mark this as answered.3 years ago
So I've created a new program for the same purpose, to create a heads and tails game but it says my flip variable is undefined how do i define it?
Python
Aqtion This should fix your problem
Screen Shot 2020-05-03 at 2.50.03 PM
i just changed the code a little. I will explain what i did down here. So basically the reason it is saying flip is undefined is because you have to include flip in the parameters of the function you are declaring. For example, you would have to do def coinFlip(flip):, and then blah blah blah. But, you also have to assign flip a temporary value, i did "" cause thats the easiest.
On a side note after running your program to test3 years ago
CodeLongAndPros Look up on You have lines 5-6 in the function coinFlip and 7-11 in You need to indent 7-11 by one.3 years ago
im trying to make a heads and tails game but keep getting invalid syntax on line 11. I dont koow how to solve this, is there any way to make my progra
Python