Error "expected an indented block" in my Phyton Calculator

Asked

Viewed 557 times

-3

I have searched for hours to Try to find a error in my codes and I didn’t get Anything! Please help me!

[This is the codes that I have write[![][1]] [Error]2 [This is the codes that I have write]3

  • Young man, this is [en.so]. Your question must be in Portuguese. And please post the code as text and not in images. You can [Edit] your question at any time.

  • First: the language here is Portuguese, so please translate your question. Second: don’t post your codes as an image, [pt.so] has code support, just do the [tour] to learn. Third: by error message, you missed indentation.

1 answer

1

Face by image can not see right, but you are not indenting the code correctly. For example when you set the btnClick function():

...
def btnClick(numbers):
    global operator
    operator = operator + str(numbers)
    text_Input.set(operator)

cal = Tk()
...

I recommend consulting the Python recommendation on the indentation requirement. Here a tutorial http://www.python-course.eu/python3_blocks.php

Browser other questions tagged

You are not signed in. Login or sign up in order to post.