Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned Up Ruotong's Posts #844

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -266,7 +266,3 @@ authors:
gravatar:
website:
github: yiyangshi
twitter:
about: "Yiyang Shi is a Master's student at UNC department of Statistics and Operations Research. She is interested in data science."


92 changes: 50 additions & 42 deletions _posts/JayYang95/2016-02-24-DrawingApp.md
Original file line number Diff line number Diff line change
@@ -6,53 +6,61 @@ title: "Jay's Drawing App"

<iframe src="https://trinket.io/embed/python/e9b9c9b95f" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Shapes
[x] Draw circle
[x] Draw square
[x] Draw triangle
[ ] Draw circle centered around point clicked
[x] Draw square centered around point clicked
[x] Draw triangle centered around point clicked

Size
[x] Allow 3 different sizes (small, medium, large) for shapes
[x] Allow 3 different pen thicknesses for line drawing
[x] Prevent current selected thickness of pen from affecting thickness of lines that shapes are drawn with

Line
[x] Allows user to click around without automatically drawing a line to that point while in line mode
[x] Let's user drag the arrow/turtle to draw a line
[ ] Have the arrow/turtle remain a static, different color from its pen colors so that it is visible under a lot of drawing

Color
[x] Let's user select different colors
[x] Brings up a different interface for user to click on a color
[x] Once color has been selected, go back to original interface
[ ] Retain the mode selected before user clicked on color mode

Modes
[x] Lets user select between different modes (Shapes, Color, Line) by clicking on them
[x] Lets user repeatedly draw whatever mode is selected until a new mode is selected
[x] Functioning clear button

Display
[x] Displays current mode, color, and size on topright
[x] Have separate turtles setup the interface and have tina be the sole turtle that does the drawing
[x] Have different turtles update each property (mode, color, size) on the display

Organization and Code
[x] Comments
[x] Use of functions and custom modules
[x] Definite loops
[x] Screen Object
[x] Keyboard + Mouse used
[ ] Generally readable and eye-pleasing
[x] Works with no errors
Shapes:

- [x] Draw circle
- [x] Draw square
- [x] Draw triangle
- [ ] Draw circle centered around point clicked
- [x] Draw square centered around point clicked
- [x] Draw triangle centered around point clicked

Size:

- [x] Allow 3 different sizes (small, medium, large) for shapes
- [x] Allow 3 different pen thicknesses for line drawing
- [x] Prevent current selected thickness of pen from affecting thickness of lines that shapes are drawn with

Line:

- [x] Allows user to click around without automatically drawing a line to that point while in line mode
- [x] Let's user drag the arrow/turtle to draw a line
- [ ] Have the arrow/turtle remain a static, different color from its pen colors so that it is visible under a lot of drawing

Color:

- [x] Let's user select different colors
- [x] Brings up a different interface for user to click on a color
- [x] Once color has been selected, go back to original interface
- [ ] Retain the mode selected before user clicked on color mode

Modes:

- [x] Lets user select between different modes (Shapes, Color, Line) by clicking on them
- [x] Lets user repeatedly draw whatever mode is selected until a new mode is selected
- [x] Functioning clear button

Display:

- [x] Displays current mode, color, and size on topright
- [x] Have separate turtles setup the interface and have tina be the sole turtle that does the drawing
- [x] Have different turtles update each property (mode, color, size) on the display

Organization and Code:

- [x] Comments
- [x] Use of functions and custom modules
- [x] Definite loops
- [x] Screen Object
- [x] Keyboard + Mouse used
- [ ] Generally readable and eye-pleasing
- [x] Works with no errors

A thing to note about the checklist. I started with a very basic list including shapes, lines, color, etc and added on to it while I
was coding. If I ran into some sort of bug or annoyance, I added it onto the list and checked it off later if it was fixed.

Reflection:

This is much like my snapshot work in progress Drawing App, but with a few additional features and some bugs fixed.
The app lets the user click on whichever mode they want (square, circle, triangle, C for color, and line). Once the user has
selected a mode, the display in the topright will change from "None" to whatever mode is currently selected. The user can then
1 change: 1 addition & 0 deletions _posts/JayYang95/2016-03-03-GameMilestones.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ title: "Jay's Game Milestones"
---

Milestones:

- [ ] Have movement be controlled by arrow keys
- [ ] Keep track of a counter variable (maybe points or something)
- [ ] Uses click events to change settings of game
1 change: 1 addition & 0 deletions _posts/RhymesWithMecca/2016-01-14-Beccas-Turtles.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: post
author: RhymesWithMecca
title: "Becca's Turtles"
---

<iframe src="https://trinket.io/embed/python/299150b7ac" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
author:
- RhymesWithMecca
- jamesma560
- RhymesWithMecca
- jamesma560
title: "Becca and James Chapter 8 Exercises, Part 2"
---

@@ -15,6 +15,6 @@ title: "Becca and James Chapter 8 Exercises, Part 2"
**Here is 8.6:**
<iframe src="https://trinket.io/embed/python/6913c1e4af" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

**Reflection (do we need one? Here it is regardless:**
**Reflection (do we need one? Here it is regardless):**
Paired programming is useful. We were definitely faster with two brains than I would have been with one. I am trying to make my
markdown fancy for the first time. Hope it works!
25 changes: 4 additions & 21 deletions _posts/RhymesWithMecca/2016-02-14-BeccasMidsemesterReflection.md
Original file line number Diff line number Diff line change
@@ -17,15 +17,7 @@ means I often make punctuation and indentation errors while doing my homework be
programming. I do like this way better, though.

**Programming and Puzzles**
My suspicion about puzzles and coding was right. One of the highlights of my week (warning: I’m about to geek out) is doing the Sunday
New York Times crossword puzzle. Usually I start, get a bit of the way through, and get stuck. Coming back to it a few hours later
or the next day is very helpful, since my brain is working on it even though I’m not directly thinking about it, and then more letters
are filled in quickly. The same is true for programming. I always have an open Chrome tab for each chapter exercise (in separate
Trinkets), because something that trips me up on one exercise will often be solved in the next one, and I navigate back and forth a lot.
I also have found it useful to come back to my code a few hours later, or the next day, and have had thoughts like, “Oh! I could use
functions here!” and suddenly my options have expanded. I’ve also found it helpful to keep the “Notes” app open on my laptop to write
notes for my reflection as I go. Early on in the class, I would write my program(s) and then forget the little things that tripped me
up, making my reflections less detailed and less helpful to my learning.
My suspicion about puzzles and coding was right. One of the highlights of my week (warning: I’m about to geek out) is doing the Sunday New York Times crossword puzzle. Usually I start, get a bit of the way through, and get stuck. Coming back to it a few hours later or the next day is very helpful, since my brain is working on it even though I’m not directly thinking about it, and then more letters are filled in quickly. The same is true for programming. I always have an open Chrome tab for each chapter exercise (in separate Trinkets), because something that trips me up on one exercise will often be solved in the next one, and I navigate back and forth a lot. I also have found it useful to come back to my code a few hours later, or the next day, and have had thoughts like, “Oh! I could use functions here!” and suddenly my options have expanded. I’ve also found it helpful to keep the “Notes” app open on my laptop to write notes for my reflection as I go. Early on in the class, I would write my program(s) and then forget the little things that tripped me up, making my reflections less detailed and less helpful to my learning.

**Things That Are Going Well**
I have enjoyed the collaborative structure of class. The ability to see classmates’ code after pull requests have been submitted is very
@@ -44,16 +36,13 @@ figure out how to get multiple clicky functions - I wanted to define clicky1 and

<iframe src="https://trinket.io/embed/python/5a29abf2df" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Some of my classmates had thought to use the coordinate grid to specify what should be drawn where. I rewrote this part of my program
such that the wand will be drawn if the user clicks on the left side of the screen, the hat if the user clicks in the middle, and the
Some of my classmates had thought to use the coordinate grid to specify what should be drawn where. I rewrote this part of my program such that the wand will be drawn if the user clicks on the left side of the screen, the hat if the user clicks in the middle, and the
Snitch if the user clicks on the right (based on which x coordinate is clicked on). I also cleaned up the text and got rid of the
congratulations animation, since it’s a bit silly, keeping the thank you text:

<iframe src="https://trinket.io/embed/python/104e1fd7b5" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

The other class session that was helpful was when we looked at chapter exercises on the screen and talked about problem solving strategies
and ways to make our code more beautiful. I used the troubleshooting suggestions of printing integers at random places throughout the
program and of printing variable types in the next homework assignment, both of which proved useful.
The other class session that was helpful was when we looked at chapter exercises on the screen and talked about problem solving strategies and ways to make our code more beautiful. I used the troubleshooting suggestions of printing integers at random places throughout the program and of printing variable types in the next homework assignment, both of which proved useful.

**Things to Work On**
Other aspects of class have frustrated me. The idea for the flower in my first program came to me pretty naturally, and then I felt like
@@ -66,13 +55,7 @@ Sometimes we throw around words in class like “refactor” and “hack” that
similar? The textbook glossaries are helpful.

I think the treasure hunt was the first time we used “foreign code” – coding techniques that we hadn’t learned yet but were in the
program (random numbers, while loops, and modules, for example) and these aspects confused me a lot and made this program, and future
ones with to-be-learned code, a lot harder. I don’t like reading ahead to figure out more efficient ways to write my programs, simply
because of information overload, but sometimes it feels necessary. I’m spending significantly more time on this class outside of class
than on my other classes (for the record, Web Development (will be Mobile Web Development for the second half of the semester), 500,
and 513 now, and I’ll be adding Data Sharing Among Scientists for the second half of the semester), because of the number and depth
of assignments and my perfectionist brain. Maybe it would be helpful to give us a preview of the upcoming textbook chapter the class
before it’s assigned.
program (random numbers, while loops, and modules, for example) and these aspects confused me a lot and made this program, and future ones with to-be-learned code, a lot harder. I don’t like reading ahead to figure out more efficient ways to write my programs, simply because of information overload, but sometimes it feels necessary. I’m spending significantly more time on this class outside of class than on my other classes (for the record, Web Development (will be Mobile Web Development for the second half of the semester), 500, and 513 now, and I’ll be adding Data Sharing Among Scientists for the second half of the semester), because of the number and depth of assignments and my perfectionist brain. Maybe it would be helpful to give us a preview of the upcoming textbook chapter the class before it’s assigned.

Paired programming has been a blessing and a curse. I like the collaborative aspect – two brains are better and faster than one –
and how we switch roles every so often. What frustrates me is the short amount of time we have in class and the expectation that
28 changes: 14 additions & 14 deletions _posts/RhymesWithMecca/2016-02-24-BeccasDrawingApp.md
Original file line number Diff line number Diff line change
@@ -12,23 +12,23 @@ title: "Becca's Drawing App"

##### User...

- [ x ] will not type - graphical interface only
- [ x ] can select drawing mode (program changes) using clicks and/or keys
- [ x ] can see current mode
- [ x ] can choose and draw shapes, lines, and colors
- [ x ] can clear drawing and start over
- [x] will not type - graphical interface only
- [x] can select drawing mode (program changes) using clicks and/or keys
- [x] can see current mode
- [x] can choose and draw shapes, lines, and colors
- [x] can clear drawing and start over

##### Program...

- [ x ] uses custom modules
- [ x ] uses custom functions
- [ x ] uses definite loops
- [ x ] uses multiple turtles
- [ x ] uses a named Screen object
- [ x ] is creative
- [ x ] runs without errors
- [ x ] is well-commented
- [ x ] is well-organized and readable
- [x] uses custom modules
- [x] uses custom functions
- [x] uses definite loops
- [x] uses multiple turtles
- [x] uses a named Screen object
- [x] is creative
- [x] runs without errors
- [x] is well-commented
- [x] is well-organized and readable

**Here is my reflection:**

16 changes: 8 additions & 8 deletions _posts/RhymesWithMecca/2016-03-08-BeccasGameApp.md
Original file line number Diff line number Diff line change
@@ -26,15 +26,15 @@ Overall, I am satisfied with what I have. I'm curious if there is a way around

**Required**

- [ x ] interface is entirely graphical
- [ x ] game uses key events (to display the surprise)
- [ x ] game uses click events (to play the trivia game [clicking on certain spots on the screen to guess answers - spots drawn by extensions of Python's turtle class])
- [ x ] game has a reason to play (winning points and a trophy)
- [ x ] game displays win screen
- [ x ] game keeps track of state - keeps track of points
- [ x ] game displays information that updates - tells you if you got the question correct and adds points as you go
- [x] interface is entirely graphical
- [x] game uses key events (to display the surprise)
- [x] game uses click events (to play the trivia game [clicking on certain spots on the screen to guess answers - spots drawn by extensions of Python's turtle class])
- [x] game has a reason to play (winning points and a trophy)
- [x] game displays win screen
- [x] game keeps track of state - keeps track of points
- [x] game displays information that updates - tells you if you got the question correct and adds points as you go

**Stretch**

- [ ] game uses key events to change turtle/player (I'm not sure if this is possible)
- [ x ] game has point accumulation
- [x] game has point accumulation
19 changes: 19 additions & 0 deletions _posts/RhymesWithMecca/2016-03-30-BeccaGaKayRegex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: post
author:
- RhymesWithMecca
- gao14g
title: "Becca's and Ga Kay's Regex Exercises"
---

**Exercise 1:**
<iframe src="https://trinket.io/embed/python3/a75e64879e" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

**Exercise 2:**
<iframe src="https://trinket.io/embed/python3/a4482a371e" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

**Exercise 3:**
<iframe src="https://trinket.io/embed/python3/d1f4743979" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

**Reflection:**
Exercise 3 became significantly easier once it was clear what we were being asked to do. 1 and 2 were fine.
Original file line number Diff line number Diff line change
@@ -70,9 +70,7 @@ print("According to your answer, the temperature you entered in degrees Celsius
+ str(fahrenheit) + "°" + " " + "Fahrenheit" + ".")
```

I did compare my conversion table to Google's temperature conversion method, and I thought that it was interesting how there was a button
available to click to allow the conversion to happen after entering in the temperature. The two methods appear fairly similar, but
I'm curious whether we'll learn how to create buttons and drop down menus with Python for the rest of the semester.
I did compare my conversion table to Google's temperature conversion method, and I thought that it was interesting how there was a button available to click to allow the conversion to happen after entering in the temperature. The two methods appear fairly similar, but I'm curious whether we'll learn how to create buttons and drop down menus with Python for the rest of the semester.

Here is my completed trinket for exercise 5:
<iframe src="https://trinket.io/embed/python/49b36ede91" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ For the second Turtle trinket I created, I wanted to experiment with some differ
to get an idea of how to do semi-circles and stars. Below is the code that I used to create semi-circles (which were meant to be hills).
I copied the code from this site <a href="http://stackoverflow.com/questions/29441237/how-to-draw-a-semi-circle-in-python-turtle-only">
here </a>. From my understanding the "x in range" command tells Tina to move in a 180 degree motion forwards and to the right 1 time.

If you wanted to do this more than once, then you would change the number that comes after the forward and right instructions. I added
the extra right(180) to get Tina pointed in the direction so that she could make multiple semi-circles back to back.

@@ -60,13 +61,10 @@ for x in range(180):
tina.fill(False)
```
I was pleased with how the hills turned out for the most part, but I couldn't figure out how to speed up drawing the hills. I even
used the proper code to increase the speed, but it would not work. Does anyone have any ideas? I guess this taught me that even though
you might copy and past code that works, it's important to understand how to work with it.
used the proper code to increase the speed, but it would not work. Does anyone have any ideas? I guess this taught me that even though you might copy and paste code that works, it's important to understand how to work with it.

I also created some stars after finishing the hills. I copied the code from this site <a href="http://stackoverflow.com/questions/26356543/turtle-graphics-draw-a-star">
here</a>. The trickiest part for the stars was figuring out the coordinates to tell them where to go so that they could appear in
different places on the screen. I'm still not 100% sure how to use the coordinates on trinket, but I was surprised to discover that you
can use negative numbers to direct Tina to different places. Below is the code that I used to draw the stars:
here</a>. The trickiest part for the stars was figuring out the coordinates to tell them where to go so that they could appear in different places on the screen. I'm still not 100% sure how to use the coordinates on trinket, but I was surprised to discover that you can use negative numbers to direct Tina to different places. Below is the code that I used to draw the stars:

```
def draw_star(size, color):
Loading