Difference: Lab2TurtleDrawing (1 vs. 13)

Revision 132019-02-12 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Changed:
<
<

Due Feb 12, 11:59pm

>
>

Due Feb 13, 11:59pm

  Moodle Link

Revision 122019-02-05 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Changed:
<
<

Due Sept 25, 11:59pm

>
>

Due Feb 12, 11:59pm

 
Changed:
<
<
Moodle Link
>
>
Moodle Link
 
Screenshot_20180919_152651.png


Goal

Line: 48 to 48
  Turn in a Repl.it link, as well as screenshots of three runs
Changed:
<
<
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with screen capture of picture 10
Extra credit (25 max)
Total 100


SolutionWeb.SolutionLab2
>
>
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in small, single function functions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with screen capture of picture 10
Extra credit (25 max)
Total 100


SolutionWeb.SolutionLab2
  *

Revision 112018-10-22 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Line: 48 to 48
  Turn in a Repl.it link, as well as screenshots of three runs
Changed:
<
<
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with screen capter of picture 10
Extra credit (25 max)
Total 100


SolutionWeb.SolutionLab2
>
>
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with screen capture of picture 10
Extra credit (25 max)
Total 100


SolutionWeb.SolutionLab2
  *

Revision 102018-09-26 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Line: 41 to 41
 9. Make function "buildNeighborhood(t,h,p) that displays 3 houses, and 5 people. Your goal is to try to make the sizes of the elements in a range that makes sense (not to big or small), and that are actually on the screen (not in some far of location). The program should also put a sun in the sky using the built-in circle function.

10. Extra credit:

Changed:
<
<
  • Pick random colors for the houses and people (5%)
  • Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 3 clicks for the 3 houses, and 5 clicks for the 5 people. (10%) (Example here: repl.it)
>
>
  • 5% - Pick random colors for the houses and people
  • 10% Place the houses and people on the screen in random locations choosen each time you run the program (with a random number generator). IT is ok if items overlap each other.
  • 10% Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 3 clicks for the 3 houses, and 5 clicks for the 5 people. (10%) (Example here: repl.it)
 

Grading

Turn in a Repl.it link, as well as screenshots of three runs

Changed:
<
<
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with screen capter of picture 10
Extra credit (15 max)
Total 100


SolutionWeb.SolutionLab2
>
>
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with screen capter of picture 10
Extra credit (25 max)
Total 100


SolutionWeb.SolutionLab2
  *

Revision 92018-09-25 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Line: 42 to 42
  10. Extra credit:
  • Pick random colors for the houses and people (5%)
Changed:
<
<
  • Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 3 clicks for the 3 houses, and 5 clicks for the 5 people. (10%)
>
>
  • Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 3 clicks for the 3 houses, and 5 clicks for the 5 people. (10%) (Example here: repl.it)
 

Grading

Turn in a Repl.it link, as well as screenshots of three runs

Changed:
<
<
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with picture of 3 runs 10
Extra credit (15 max)
Total 100


SolutionWeb.SolutionLab2
>
>
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with screen capter of picture 10
Extra credit (15 max)
Total 100


SolutionWeb.SolutionLab2
  *

Revision 82018-09-24 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Line: 9 to 9
 
Screenshot_20180919_152651.png


Goal

Changed:
<
<
Too learn about funtions and Turtle graphics
>
>
To learn about funtions and Turtle graphics

Turtle Graphics functions

 

Method

1. First consider the simple the code below:

Line: 36 to 38
  8. Make a function drawPerson to draw a stick figure of a given size, color and fill. This should be scalable too.
Changed:
<
<
9. Make function "buildNeighborhood(t,h,p) that displays 3 houses, and 5 people. Your goal is to try to make the sizes of the elements in a range that makes sense (not to big or small), and that are actually on the screen (not in some far of location). The program should also put a sun in the sky using the built-in circle function.
>
>
9. Make function "buildNeighborhood(t,h,p) that displays 3 houses, and 5 people. Your goal is to try to make the sizes of the elements in a range that makes sense (not to big or small), and that are actually on the screen (not in some far of location). The program should also put a sun in the sky using the built-in circle function.
  10. Extra credit:
  • Pick random colors for the houses and people (5%)

Revision 72018-09-21 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Line: 24 to 24
  3. Start a new repl.it with the previous code.
Changed:
<
<
4. Finish the drawPolygon and drawRectangle functions. Draw several Polygons and retangles.
>
>
4. Finish the drawPolygon and drawRectangle functions. Draw several Polygons and rectangles.
  5. Add a color option, and color fill option to every object type. (add parameters to do this)
Changed:
<
<
6. Rewrite the drawSquare and drawTriangle functions use the drawPolygon function to do the work.
>
>
6. Rewrite the drawSquare and drawTriangle functions use the drawPolygon function to do the work.
 
Changed:
<
<
7. Finish the drawHouse function. The house should make use of the other functions to make a house with a roof, a door, some windows, and anything else you feel is nice. The house should use color and fill to make it look nice.
>
>
7. Finish the drawHouse function. The house should make use of the other functions to make a house with a roof, a door, some windows, and anything else you feel is nice. The house should use color and fill to make it look nice. The trick is the make the house scalable. In order to do that you will need to draw everything relative to the starting position of where you start the house. An example of a scalable drawing is below. Not that I use a function I wrote called moveRelative to relative to my current position, and that moves are a fraction of the size. Notice also that the size of everything is a fraction of the original size. Thus when chage the size of the object, everything in the object scales accourtingly.
 
Changed:
<
<
8. Can you figure out how to make a circle circle with the polygon function? Make the function with a call like this "drawCircle(t,radius,color,fill)".
>
>
 
Changed:
<
<
9. Make a function to draw a stick figure of a given size, color and fill.
>
>
8. Make a function drawPerson to draw a stick figure of a given size, color and fill. This should be scalable too.
 
Changed:
<
<
10. Make function "buildNeighborhood(t,h,p), given a number x, displays 3 houses of random sizes at random locations, and 10 people of random sizes at random locations. Your goal is to try to make the sizes of the elements in a range that makes sense (not to big or small), and that are actually on the screen (not in some far of location). The program should also put a sun in the sky using the drawCircle function.
>
>
9. Make function "buildNeighborhood(t,h,p) that displays 3 houses, and 5 people. Your goal is to try to make the sizes of the elements in a range that makes sense (not to big or small), and that are actually on the screen (not in some far of location). The program should also put a sun in the sky using the built-in circle function.
 
Changed:
<
<
11. Extra credit:
>
>
10. Extra credit:
 
  • Pick random colors for the houses and people (5%)
Changed:
<
<
  • Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 5 clicks for the 5 houses, and 10 clicks for the 10 people. (10%)
>
>
  • Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 3 clicks for the 3 houses, and 5 clicks for the 5 people. (10%)
 

Grading

Changed:
<
<
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with picture of 3 runs 10
Extra credit (15 max)
Total 100


SolutionWeb.SolutionLab2
>
>
Turn in a Repl.it link, as well as screenshots of three runs

RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with picture of 3 runs 10
Extra credit (15 max)
Total 100


SolutionWeb.SolutionLab2
  *

Revision 62018-09-21 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Due Sept 25, 11:59pm

Changed:
<
<
Moodle Link
>
>
Moodle Link
 
Screenshot_20180919_152651.png


Goal

Line: 43 to 43
 
  • Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 5 clicks for the 5 houses, and 10 clicks for the 10 people. (10%)

Grading

Changed:
<
<
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Comments at the top, and on all functions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Description Comments on top 5
Document picture of 3 runs 10
Extra credit (15 max)
Total 100


SolutionWeb.SolutionLab2
>
>
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Code broken up in fsmall, single function unctions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Comments at the top, and on all functions 5
Document with picture of 3 runs 10
Extra credit (15 max)
Total 100


SolutionWeb.SolutionLab2
 
Changed:
<
<
  • Screenshot_20180919_152651.png:
>
>
*
 
META FILEATTACHMENT attachment="Screenshot_20180918_001125.png" attr="" comment="" date="1537243975" name="Screenshot_20180918_001125.png" path="Screenshot_20180918_001125.png" size="10548" user="JimSkon" version="1"
META FILEATTACHMENT attachment="Screen_Shot_2018-09-19_at_1.09.38_PM.png" attr="" comment="" date="1537377133" name="Screen_Shot_2018-09-19_at_1.09.38_PM.png" path="Screen_Shot_2018-09-19_at_1.09.38_PM.png" size="57490" user="JimSkon" version="1"

Revision 52018-09-20 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Line: 43 to 43
 
  • Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 5 clicks for the 5 houses, and 10 clicks for the 10 people. (10%)

Grading

Changed:
<
<
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Comments at the top, and on all functions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Description Comments on top 5
Document picture of 3 runs 10
Extra credit (15 max)
Total 100


SolutionLab2
>
>
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Comments at the top, and on all functions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Description Comments on top 5
Document picture of 3 runs 10
Extra credit (15 max)
Total 100


SolutionWeb.SolutionLab2
 
  • Screenshot_20180919_152651.png:

Revision 42018-09-19 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Line: 6 to 6
  Moodle Link
Changed:
<
<
Screen_Shot_2018-09-19_at_1.09.38_PM.png
>
>
Screenshot_20180919_152651.png
 


Goal

Too learn about funtions and Turtle graphics

Line: 36 to 36
  9. Make a function to draw a stick figure of a given size, color and fill.
Changed:
<
<
10. Make function "buildNeighborhood(t,h,p), given a number x, displays 5 houses of random sizes at random locations, and 10 people of random sizes at random locations. Your goal is to try to make the sizes of the elements in a range that makes sense (not to big or small), and that are actually on the screen (not in some far of location). The program should also put a sun in the sky using the drawCircle function.
>
>
10. Make function "buildNeighborhood(t,h,p), given a number x, displays 3 houses of random sizes at random locations, and 10 people of random sizes at random locations. Your goal is to try to make the sizes of the elements in a range that makes sense (not to big or small), and that are actually on the screen (not in some far of location). The program should also put a sun in the sky using the drawCircle function.
  11. Extra credit:
  • Pick random colors for the houses and people (5%)
  • Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 5 clicks for the 5 houses, and 10 clicks for the 10 people. (10%)

Grading

Changed:
<
<
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Comments at the top, and on all functions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Description Comments on top 5
Document picture of 3 runs 10
Extra credit (15 max)
Total 100

  • Screen_Shot_2018-09-19_at_1.09.38_PM.png:
>
>
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Comments at the top, and on all functions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Description Comments on top 5
Document picture of 3 runs 10
Extra credit (15 max)
Total 100


SolutionLab2

  • Screenshot_20180919_152651.png:
 
META FILEATTACHMENT attachment="Screenshot_20180918_001125.png" attr="" comment="" date="1537243975" name="Screenshot_20180918_001125.png" path="Screenshot_20180918_001125.png" size="10548" user="JimSkon" version="1"
META FILEATTACHMENT attachment="Screen_Shot_2018-09-19_at_1.09.38_PM.png" attr="" comment="" date="1537377133" name="Screen_Shot_2018-09-19_at_1.09.38_PM.png" path="Screen_Shot_2018-09-19_at_1.09.38_PM.png" size="57490" user="JimSkon" version="1"
Added:
>
>
META FILEATTACHMENT attachment="Screenshot_20180919_151657.png" attr="" comment="" date="1537384705" name="Screenshot_20180919_151657.png" path="Screenshot_20180919_151657.png" size="16228" user="JimSkon" version="1"
META FILEATTACHMENT attachment="Screenshot_20180919_152651.png" attr="" comment="" date="1537385613" name="Screenshot_20180919_152651.png" path="Screenshot_20180919_152651.png" size="18512" user="JimSkon" version="1"

Revision 32018-09-19 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Line: 6 to 6
  Moodle Link
Changed:
<
<
Screenshot_20180918_001125.png
>
>
Screen_Shot_2018-09-19_at_1.09.38_PM.png
 


Goal

Too learn about funtions and Turtle graphics

Line: 44 to 44
 

Grading

RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Comments at the top, and on all functions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Description Comments on top 5
Document picture of 3 runs 10
Extra credit (15 max)
Total 100

Added:
>
>
  • Screen_Shot_2018-09-19_at_1.09.38_PM.png:
 
META FILEATTACHMENT attachment="Screenshot_20180918_001125.png" attr="" comment="" date="1537243975" name="Screenshot_20180918_001125.png" path="Screenshot_20180918_001125.png" size="10548" user="JimSkon" version="1"
Added:
>
>
META FILEATTACHMENT attachment="Screen_Shot_2018-09-19_at_1.09.38_PM.png" attr="" comment="" date="1537377133" name="Screen_Shot_2018-09-19_at_1.09.38_PM.png" path="Screen_Shot_2018-09-19_at_1.09.38_PM.png" size="57490" user="JimSkon" version="1"

Revision 22018-09-19 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Line: 12 to 12
 Too learn about funtions and Turtle graphics

Method

Changed:
<
<
1. Consider the code below:
>
>
1. First consider the simple the code below:

Note it uses no comments.

2. Consider a better version below, with functions:

 
Changed:
<
<
2. Finish the drawPolygon function. Draw several Polygons and take a screen shot of the results. Turn in a link to the result Repl.it
>
>
3. Start a new repl.it with the previous code.

4. Finish the drawPolygon and drawRectangle functions. Draw several Polygons and retangles.

5. Add a color option, and color fill option to every object type. (add parameters to do this)

6. Rewrite the drawSquare and drawTriangle functions use the drawPolygon function to do the work.

7. Finish the drawHouse function. The house should make use of the other functions to make a house with a roof, a door, some windows, and anything else you feel is nice. The house should use color and fill to make it look nice.

8. Can you figure out how to make a circle circle with the polygon function? Make the function with a call like this "drawCircle(t,radius,color,fill)".

9. Make a function to draw a stick figure of a given size, color and fill.

 
Changed:
<
<
3. In a new Repl.it Rewrite the drawRegtangle and drawTriangle functions to instead use the drawPolygon function to do the work. Turn in the Repl.it and screen shot of your tests.
>
>
10. Make function "buildNeighborhood(t,h,p), given a number x, displays 5 houses of random sizes at random locations, and 10 people of random sizes at random locations. Your goal is to try to make the sizes of the elements in a range that makes sense (not to big or small), and that are actually on the screen (not in some far of location). The program should also put a sun in the sky using the drawCircle function.
 
Changed:
<
<
3. Finish the drawHouse function in a new Repl.it. Make a screen a 5 houses on it of different sizes. Take a screen shot, and turn in the Repl.it
>
>
11. Extra credit:
  • Pick random colors for the houses and people (5%)
  • Have the buildNeighborhood actually place the houses on the screen by where you click with the mouse. E.g. 5 clicks for the 5 houses, and 10 clicks for the 10 people. (10%)

Grading

 
Changed:
<
<
4. Make a function that tht uses a loop to draw a row of 8 houses, each increasing in size from left to right. The function should be given the two (x,y) cordinates, one of the upper right corner, and the other the lower right corner of a rectangle. The runtine will make each house 10% bigger then the one on it's right, and will be sized and scale to eactly fit in the space of the rectangle. Take a screen shot, and turn in the Repl.it try it for several different size rectangle.
>
>
RequirementsGrading CommentsPointsScore
Completion of all functional requirements 60
Comments at the top, and on all functions 10
Appropriate code formatting 5
Meaningful identifier names (variables, functions) 10
Description Comments on top 5
Document picture of 3 runs 10
Extra credit (15 max)
Total 100

 
META FILEATTACHMENT attachment="Screenshot_20180918_001125.png" attr="" comment="" date="1537243975" name="Screenshot_20180918_001125.png" path="Screenshot_20180918_001125.png" size="10548" user="JimSkon" version="1"

Revision 12018-09-18 - JimSkon

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="IntroToCSF2018"

Lab 2 - Turtle drawing with functions

Due Sept 25, 11:59pm

Moodle Link

Screenshot_20180918_001125.png


Goal

Too learn about funtions and Turtle graphics

Method

1. Consider the code below:

2. Finish the drawPolygon function. Draw several Polygons and take a screen shot of the results. Turn in a link to the result Repl.it

3. In a new Repl.it Rewrite the drawRegtangle and drawTriangle functions to instead use the drawPolygon function to do the work. Turn in the Repl.it and screen shot of your tests.

3. Finish the drawHouse function in a new Repl.it. Make a screen a 5 houses on it of different sizes. Take a screen shot, and turn in the Repl.it

4. Make a function that tht uses a loop to draw a row of 8 houses, each increasing in size from left to right. The function should be given the two (x,y) cordinates, one of the upper right corner, and the other the lower right corner of a rectangle. The runtine will make each house 10% bigger then the one on it's right, and will be sized and scale to eactly fit in the space of the rectangle. Take a screen shot, and turn in the Repl.it try it for several different size rectangle.

META FILEATTACHMENT attachment="Screenshot_20180918_001125.png" attr="" comment="" date="1537243975" name="Screenshot_20180918_001125.png" path="Screenshot_20180918_001125.png" size="10548" user="JimSkon" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback