User Profile

Collapse

Profile Sidebar

Collapse
PythonKid123
PythonKid123
Last Activity: Nov 30 '14, 07:49 PM
Joined: Nov 28 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • PythonKid123
    replied to Tkinter converting entry to int error
    Still coming up with an error(sorry im a noob at python) TypeError: can't multiply sequence by non-int of type 'float'
    CODE:
    Code:
    import tkinter
    import turtle
    window = tkinter.Tk()
    
    def callback():
       value=ent.get()
       
       print("sides =", value, type(int))
       value1=ent1.get()
       print("length =", value1, type(int))
       
       pen1 = turtle.Pen()
       pen1.forward(value1)
    ...
    See more | Go to post
    Last edited by Rabbit; Nov 29 '14, 07:46 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data. Second warning

    Leave a comment:


  • PythonKid123
    started a topic Tkinter converting entry to int error

    Tkinter converting entry to int error

    I am trying to finish my program but it comes up with this error....The program asks you how many sides and the length of the sides then draws a shape....

    Code:
    import tkinter
    import turtle
    window = tkinter.Tk()
    
    def callback():
        pen1 = turtle.Pen()
        for i in range(ent):
            pen1.forward(ent1)
            pen1.right(360/ent)
        
    
    lbl = tkinter.Label(window, text="How
    ...
    See more | Go to post
    Last edited by Rabbit; Nov 28 '14, 09:23 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More
Working...