warmup 8.htm.pdf - COM110 Fall 2014 Warm-up exercises 8 and...

Info icon This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COM110 Fall 2014 Warm-­‐up exercises 8 and 9 Both due Wed, Oct 8 Warm-­‐up 8) Continue coding practice using CodingBat. • Make sure you log in to CodingBat before you begin coding, otherwise your work will not be saved and shared with me. • Code until: o at least twenty minutes passes AND o you have solved/completed two more problems/exercises (Remember that AND means both conditions have to be true.) Warm-­‐up 9) 1. Continue working on the button.py program we started in class. Add a second button for drawing a square at the top, like the one for drawing the Circle. 2. Put the code for drawing the Square into a separate parameterized function that you deTine then invoke, just like the one we created for drawing the Circle. 3. Then create a parameterized function called drawButton(gwin,pt1,pt2,label) for drawing buttons and invoke it to create the two buttons rather than hard-­‐coding them (as youdid in step 1). This is the function you will use to create buttons in your prog assign 3 code. Here is the function header/speciTication: #Draws onto gwin a rectangular button defined by the Points pt1, pt2 # with a Text object on top of it displaying the string label def drawButton(gwin, pt1, pt2, label): ...
View Full Document

  • Fall '15
  • Cannon

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern