我的代碼有問題。循環僅運行一次用戶輸入的號碼。謝謝您的幫助。 #create an empty list and ask the user how many items they want to add
# take the items the user entered and add it to the empty list.
print("enter the number of items
我已經編寫了一個腳本,它應該根據不同的變量(xa,ya,xb等)計算相交點(xp,yp) yb,xc,yc,xd,yd)並用座標系中的點繪製線段。一般它的工作,但有一個問題。我想在Clickig按鈕「Oblicz」後在Tkinter窗口中顯示我的結果(xp,yp),但執行self.xp.set(XP)後出現錯誤AttributeError: Entry instance has no attrib
values=input('Enter the numbers :')
print ("The values are", values)
numbers=[x for x in values.split(',') if int(x)%2!=0 ]
print (",".join(numbers))
QUES的區別:大家好,我的代碼運行良好,它只是我想知道這兩個輸入12345和1之間的區別
我有一本字典 dicto = {12:{34:45,56:78},45:{67:23,90:15}}
我想刪除一個鍵值對說dictionary.How的關鍵45的67:23做呢? 這是我做的,到目前爲止,但我得到的錯誤 dicto = {12:{34:45,56:78},45:{67:23,90:15}}
for k,v in dicto.items():
for i in v.k