how to solve problems with "referenced before assignment"?

Asked

Viewed 108 times

0

from tkinter import *
from tkinter import messagebox

jan = Tk()
jan.title("Pontuacao")
jan.geometry("200x200")

pontos = 0

a = Label(jan, text="pontos")
a.place(x=0,y=0)

def aumentar_pontos():
    pontos += 1
    messagebox.showinfo(title="Aviso", message=("Pontuaçao aumentada, qnt: 
    ",pontos))


ab = Button(jan, text="aumentar pontuacao", command=aumentar_pontos)
ab.place(x=0,y=50)

but always of the problem of "referenced before assignment"

  • 1

    https://stackoverflow.com/a/20725727/4312593

  • 1

    What is the cpcld? I guess that’s why

No answers

Browser other questions tagged

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