Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Input function problem?
-
Hello, in the interactive interpreter I am entering
name = input("Enter the name") # or name = input('Enter the name')
but I am getting a syntax error on the 2nd quotation mark. Any idea why this is happening?
Thank you,
James
-
@jameslooby No spaces/blanks at begin?
-
@jameslooby Python 2 or 3?
-
@jameslooby the end quote is not the same as the first one
A long press on the double quote character shows two almost identical charactersname = input("Enter the name”) ^ SyntaxError: EOL while scanning string literal```
-
Note it works correctly if I do not provide the input function with an argument (i.e. a string enclosed in single or double quotes).
Thanks again,
James
-
No spaces and I am using the same quotes to begin and end argument string although I have also tried them with different open and closed quotes. I will research if my iPad Pythonista app is running 2 or 3
-
@jameslooby Pythonista left Files, bottom settings
-
Yes, python 3.6
-
@jameslooby which syntax error?
-
SyntaxError: invalid character in identifier with the carat pointing up at the single or double quotes. On the iPad keyboard there are 2 separate single quotes and 2 separate double quotes which throws me off. I believe I have tried every combination. Rather perplexing for a Comp Sci professor :)
-
@jameslooby Did you try to remove Pythonista from tasks list and restart it?
As you don't have the error without argument, I think it comes from your (double) quotes...
Perhaps an invalid keyboard?
I can't help you, hoping other people could do it with success. -
@jameslooby, do you have the Pythonista auxiliary keyboard above the regular keyboard? That has the right (and only the right) quotes for Python.
-
This post is deleted!