Problem with code from automate the boring stuff

def spam():
eggs = ‘spam local’
print (eggs(

def bacon():
eggs = ‘bacon local’
print (eggs)
spam()
print (eggs)

eggs = ‘global’
bacon()
print (eggs)

line 5 is ‘invalid syntax’

I am a brand newbie

ps - I couldn’t figure out how to show the indentations but they are in my code

Welcome to the forum. To highlight your script as it appears on your terminal, select the entire script that you have posted then click the </> symbol above.

So, just referencing your script, there is a misspelling:

should be:
print (eggs)

The closing brace in your script is backwards.

Hi, I’m the author of Automate. Thanks to Paul for solving this.

A lot of the syntax errors that you get are from one-character or other simple typos like these: unclosed parentheses/brackets, missing commas/periods/colons, and out of order keywords. It helps to use an editor that will detect these in real time (kind of like spell check in a word processor) so you can immediately have it called to your attention.

Good luck on your programming journey!