2 Replies - 1389 Views - Last Post: 28 February 2013 - 05:13 PM Rate Topic: -----

#1 snow_ninja67  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 46
  • Joined: 29-January 13

HW project with input variables

Posted 28 February 2013 - 03:06 PM

So i am doing a HW project with input variables but i have something weird happening for my first input. Secondly Any pointers to the HW project. I will paste the HW instructions here:
Using the turtle commands and functions you’ve learned so far, write code to draw a
new picture of your choosing that uses at least three different colors and at least three
different shapes.
TIP: The same shape in different sizes counts as different shapes.
Below are some suggestions for pictures you could draw. Do not draw the same picture
you drew in assignment 2C.
Tree - using circles and rectangles
Face - using circles, rectangles, and triangles
House - using squares, rectangles, and triangles
Car - using rectangles, squares, triangles, and circles
Flower - using rectangles, triangles, and circles
Boat - using triangles and rectangles
that is basicly it currently this is how my code looks like and i have run into a slight problem run the code and you will see what i mean.
from turtle import *

#define the variables
hull_width = int(input("Please input the width of the ship: ")) # whole thing or only 
space_height = int(input("Input the height of the ship: ")) # for the whole thing?
pen_color1 =(input("please input the color of the hull: ")) # color for the hull

def draw_hull():
    penup()
    goto(100,50)
    pendown()
    color(pen_color1)
    forward(hull_width)
    left(70)
    forward(space_height)
    left(110)
    forward(hull_width)
    forward(hull_width)
    left(110)
    forward(space_height)
    left(67)
    
draw_hull()




Is This A Good Question/Topic? 0
  • +

Replies To: HW project with input variables

#2 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3814
  • View blog
  • Posts: 13,527
  • Joined: 12-December 12

Re: HW project with input variables

Posted 28 February 2013 - 04:29 PM

I am not sure what I am supposed to be looking for,apart from the fact that your hull is incomplete and you are not using any circles, triangles or rectangles, as per the assignment.

.. or squares.

.. I assume you are using a pencil and some grid-paper to work out your measurements(?).

Hint:
Practice drawing a simple circle first, then add a rectangle, then make them overlap.

This post has been edited by andrewsw: 28 February 2013 - 04:29 PM

Was This Post Helpful? 0
  • +
  • -

#3 snow_ninja67  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 46
  • Joined: 29-January 13

Re: HW project with input variables

Posted 28 February 2013 - 05:13 PM

View Postandrewsw, on 28 February 2013 - 04:29 PM, said:

I am not sure what I am supposed to be looking for,apart from the fact that your hull is incomplete and you are not using any circles, triangles or rectangles, as per the assignment.

.. or squares.

.. I assume you are using a pencil and some grid-paper to work out your measurements(?).

Hint:
Practice drawing a simple circle first, then add a rectangle, then make them overlap.

yes and no but basically what it wanted was 2 controllable variables and i was thinking either that or color and length? since that would fit the requirements.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1