Str Python error?

Hi everyone, I just started using Python and wanted to build some kind of calculator.

As you can see, this error code is popping up on the right, but I haven't quite figured out what it means yet. I hope someone can help me. If you have any tips, feel free to post them, as I'd like to improve myself.

Thank you in advance

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
8 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
BorisG2011
1 year ago

In line 5, you have an assignment to print. Print is then a series of characters and the attempt (in line 11) to call the print function is missing.

Improve line 5 so:

print("--Trinkgeldrechner==")

The equality sign between the word print and the opening clip must not stand there and is undoubtedly also only a misfortune in your program text.

BorisG2011
1 year ago
Reply to  lukasqwed

The incorrect error in line 5 has also caused the text

= ================================================================

was not written into the console. You could have noticed. However, I noticed this only after I already realized the mistake. What I want to say is this: In troubleshooting, it can also be helpful to look at the console protocol exactly and to check if there is really everything that should be in it.

Best regards

xxfistexx
1 year ago

line 11 missing the ” signs

Dultus, UserMod Light
Reply to  xxfistexx

Since a variable is to be output here, no quotes are missing.

xxfistexx
1 year ago

the answer should be output as string.

Dultus, UserMod Light

That doesn’t change – then the answer would be “answer”.