x = 0
def function(x):
x = x + 1
function(x)
print(x)
meinst du so?
Die Suche ergab 3 Treffer
- Donnerstag 1. April 2021, 12:15
- Forum: Allgemeine Fragen
- Thema: Ich verstehe die Funktion nicht
- Antworten: 3
- Zugriffe: 719
- Donnerstag 1. April 2021, 11:42
- Forum: Allgemeine Fragen
- Thema: Ich verstehe die Funktion nicht
- Antworten: 3
- Zugriffe: 719
Ich verstehe die Funktion nicht
x = 0
def function(x):
x += 1
function(x)
print(x)
Warum kann ich nicht auf das x addieren? Irgendwie verstehe ich das nicht.
def function(x):
x += 1
function(x)
print(x)
Warum kann ich nicht auf das x addieren? Irgendwie verstehe ich das nicht.
- Sonntag 7. März 2021, 12:20
- Forum: Allgemeine Fragen
- Thema: GUI - Anfänger Frage
- Antworten: 1
- Zugriffe: 370
GUI - Anfänger Frage
from tkinter import *
root = Tk()
root.title("Test")
day = 1
def next_day():
label1["text"]+= 1
button1 = Button(root,text="next day",command=lambda: (next_day)).grid(row=0,column=0)
label1 = Label(root,text=tag).grid(row=1,column=0)
root.mainloop()
Warum geht es nicht den tag um 1 zu ...
root = Tk()
root.title("Test")
day = 1
def next_day():
label1["text"]+= 1
button1 = Button(root,text="next day",command=lambda: (next_day)).grid(row=0,column=0)
label1 = Label(root,text=tag).grid(row=1,column=0)
root.mainloop()
Warum geht es nicht den tag um 1 zu ...
