Skip to content

Commit

Permalink
updates to markdown content
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccreary committed Mar 15, 2021
1 parent 2384c96 commit 08fd676
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
10 changes: 8 additions & 2 deletions docs/trinket/08-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import random
dan = turtle.Turtle()
dan.shape('turtle')

colorList = ['red', 'orange', 'yellow', 'green', 'blue', 'purple', 'pink', 'brown', 'gray', 'gold']
colorList = ['red', 'orange', 'yellow', 'green', 'blue',
'purple', 'pink', 'brown', 'gray', 'gold']

dan.begin_fill()
dan.color(colorList[3])
Expand All @@ -35,4 +36,9 @@ dan.end_fill()
[Draw a Green Circle Using List](https://trinket.io/python/6b93c1711f)

## Experiments
Can you change the name of the function to be "petal"?

1. Can you change the name of the function to be "petal"?
1. What does ```print(len(colorList))``` return?
1. Go to the [Trinket colors page](https://trinket.io/docs/colors) and see the name of other colors you can use.
1. What happens if a list does not fit on a single line? Can a list span multiple lines?
1. Can you use double quotes and single quotes in the same list?
3 changes: 2 additions & 1 deletion docs/trinket/08-random.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ dan.goto(0,0)
## Experiments
1. Can you create a variable that is used to control the distance from the origin to wander? Right now the distance is set to be 200 on each extent.
2. Can you create a variable for the number of circles to draw?
3. Go to the [Trinket colors page](https://trinket.io/docs/colors) and see the name of other colors you can use. Note that you can use
3. Go to the [Trinket colors page](https://trinket.io/docs/colors) and see the name of other colors you can use. Note that you can use any of these colors in your lists.
4. Right now, all the circles are 7 pixels in size. Can you make the circles have a random size from 3 to 20?
11 changes: 8 additions & 3 deletions docs/trinket/11-input.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Input
# Getting Inputs from the User

We can prompt the user to supply a number using the input() function.

Expand All @@ -23,6 +23,11 @@ while colorIndexInt > -1:
dan.write('done!')
```

# Example on Trinket
## Example on Trinket

[Run the Input Example on Trinket](https://trinket.io/python/a4a951eeab)
[Run the Input Example on Trinket](https://trinket.io/python/a4a951eeab)

## Experiments

1. Write a program that will prompt the user to enter the number of shapes to draw, the size of the shapes, the color of the shapes and the range of the screen to draw them (50 to 200).
2. Add some additional code to check the range of your expected values. If the input is out of range, then continue to prompt the user to enter the correct number until they get a valid number. Use a ```while``` statement to continue prompting.
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ theme:
markdown_extensions:
- admonition
- footnotes
- pymdownx.highlight
- pymdownx.superfences
- toc:
permalink: true
plugins:
- search
markdown_extensions:
- pymdownx.highlight
- pymdownx.superfences

2 changes: 1 addition & 1 deletion theme/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{{ config.copyright }}
</div>
{% endif %}
built with the <a href="http://microsite.optum.com">Micro-Site Builder</a>
All content is covered under the <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike.</a>
</div>
{% include "partials/social.html" %}
</div>
Expand Down

0 comments on commit 08fd676

Please sign in to comment.