0

As an exercise we need to explain what happens when we leave an open paranthesesis in a print statement.

Doing so does not give us an error nor a value, the resulting line gives us a prompt consisting of dots instead of arrows. Does this situation/prompt have a name and can someone explain?

for example:

>>>print('Hello'

...
DeepSpace
  • 78,697
  • 11
  • 109
  • 154

2 Answers2

0

The official name is secondary prompt. It is used when inputting incomplete constructs, for example not closing any set of parentheses or when defining a function.

DeepSpace
  • 78,697
  • 11
  • 109
  • 154
0

The three greater-than signs (>>>) prompts for the next command, which the interpreter can process at once. The three dots (...), in its turn, prompts the continuation lines, such as print(: interpreter can't process your command at once, because it, in this case, doesn't know the arguments you want to pass to the function.

Kassi
  • 151
  • 2
  • 12