[Tutor] code help

itsthewendigo1111 . wdaltonarnold at gmail.com
Mon Sep 22 17:16:29 CEST 2014


I'm taking an online intro to programing class unfortunately the teacher
has not be very helpful.   well this is the assignment
http://burtondsc.pbworks.com/w/file/fetch/84469141/Assignment03.pdf     and
here is my code so far

from tkinter import*
master = Tk();

canvas = Canvas(master, width = simpledialog.askinteger("Canvas size",
"Enter width of canvas"))
canvas = Canvas(master, height = simpledialog.askinteger("Canvas size",
"Enter height of canvas"))
canvas = Canvas(master, background = simpledialog.askstring("Canvas color",
"Enter color for canvas"))
canvas.pack()

s1 = canvas.create_rectangle(150,300,450,150, width =
simpledialog.askinteger('Square size', "Enter side length of square"))
s1 = simpledialog.askstring("Square color","Enter color for the square")


I'm having trouble with the "width = simpledialog.askinteger".  width
almost makes like a border and not resize the square.   I have tried using
size,length, len, scale, but nothing seems to work.  I'm also having
trouble with getting the square to change color.  If u guys could offer any
help I would really appreciate it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140922/558c9c7d/attachment.html>


More information about the Tutor mailing list