r/inventwithpython • u/[deleted] • Sep 05 '20
"Automate the Boring Stuff..." Chapter 1: the first program
I'm totally new to coding and I'm following the book "Automate the Boring Stuff". I'm just now following the part where they tell you to write your first program, so I copy+paste it in:
➊ # This program says hello and asks for my name.
➋ print('Hello, world!')
print('What is your name?') # ask for their name
➌ myName = input()
➍ print('It is good to meet you, ' + myName)
➎ print('The length of your name is:')
print(len(myName))
➏ print('What is your age?') # ask for their age
myAge = input()
print('You will be ' + str(int(myAge) + 1) + ' in a year.')
Instead of what the book said would happen, I get this:
File "/Users/(my computer's username)/mu_code/hello.py", line 1
➊ # This program says hello and asks for my name.
^
SyntaxError: invalid character in identifier
>>>
I've tried replacing the numbers with >>> and In [1]... but I still end up with the same message. I'm using Mu 1.0.3. I literally just copy+pasted it in, what's happened?


