i’m just writing my first python code, the fizz-buzz thing, and getting syntax errors on this:
v=input("?")
print(“fizz” if v%3==0)
print(“buzz” if v%5==0)
i’ve tried every variant i can think of, and it doesn’t like it. wondering if perhaps i failed to install a necessary extension to VS, but the other simple stuff i did before this worked. super annoying.
also, i’m using a mac, and i don’t know where to find the debug hotkeys. at one point i saw a small toolbar floating at the top of my code window, with debug icons, but it disappeared and i can’t find it now. also, when i try to fix the error and run again, i get a message that the code is already running, even though it stalled out.
hi, thank you for your reply. yes, your way works. but before posting, i found several python references that seem to show my way should work, and yet it doesn’t.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.