From 1d1f68093bba8917cee26af11f2ae8673978fd62 Mon Sep 17 00:00:00 2001 From: Bianca Date: Tue, 3 Apr 2018 16:27:38 -0400 Subject: [PATCH 1/6] Update README.md . --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 67b0c15..103fdb3 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,4 @@ Misc. simple Python projects for teaching myself basic concepts. TempConverter: A very simple temperature converter written in Python. +(written by me, not using a tutorial) From dbbd669db741d8c1b0736774c412a3ad6c620dd2 Mon Sep 17 00:00:00 2001 From: Bianca Date: Tue, 3 Apr 2018 16:31:58 -0400 Subject: [PATCH 2/6] Delete Spiro.py --- Spiro.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 Spiro.py diff --git a/Spiro.py b/Spiro.py deleted file mode 100644 index e44884c..0000000 --- a/Spiro.py +++ /dev/null @@ -1,26 +0,0 @@ -# a class that draws a Spirograph -class Spiro: - - # constructor - def _init_(self, xc, yc, col, R, r, l): - - # create the turtle object - self.t = turtle.Turtle() - # set the cursor shape - self.t.shape('turtle') - # set the step in degrees - self.step = 5 - # set the drawing complete flag - self.drawingComplete = False - - # set the parameters - self.setparams(xc, yc, col, R, r, l) - - # initialize the drawing - self.restart() - - # set the parameters - def setparams(self, xc, yc, col, R, l): - # the Spirograph parameters - self.xc = xc - self.yc = yc From f495d3e214376b0a834f954b7adfb8379b98044c Mon Sep 17 00:00:00 2001 From: Bianca Date: Tue, 3 Apr 2018 16:34:06 -0400 Subject: [PATCH 3/6] Create Spiro-1.py --- InProgress/Spiro-1.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 InProgress/Spiro-1.py diff --git a/InProgress/Spiro-1.py b/InProgress/Spiro-1.py new file mode 100644 index 0000000..fb8a6b0 --- /dev/null +++ b/InProgress/Spiro-1.py @@ -0,0 +1,8 @@ +import sys, random, argparse +import numpy as np +import math +import turtle +import random +from PIL import Image +from datetime import datetime +from fractions import gcd From 85c71f7ebd74cd2fb2b4d27983376168a802db5f Mon Sep 17 00:00:00 2001 From: Bianca Date: Tue, 3 Apr 2018 16:34:19 -0400 Subject: [PATCH 4/6] Add files via upload --- InProgress/Spiro.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 InProgress/Spiro.py diff --git a/InProgress/Spiro.py b/InProgress/Spiro.py new file mode 100644 index 0000000..e44884c --- /dev/null +++ b/InProgress/Spiro.py @@ -0,0 +1,26 @@ +# a class that draws a Spirograph +class Spiro: + + # constructor + def _init_(self, xc, yc, col, R, r, l): + + # create the turtle object + self.t = turtle.Turtle() + # set the cursor shape + self.t.shape('turtle') + # set the step in degrees + self.step = 5 + # set the drawing complete flag + self.drawingComplete = False + + # set the parameters + self.setparams(xc, yc, col, R, r, l) + + # initialize the drawing + self.restart() + + # set the parameters + def setparams(self, xc, yc, col, R, l): + # the Spirograph parameters + self.xc = xc + self.yc = yc From e48e01657b5828ea65ba11792c98ad5936fab868 Mon Sep 17 00:00:00 2001 From: Bianca Date: Tue, 3 Apr 2018 16:35:42 -0400 Subject: [PATCH 5/6] Create Dragon.py --- Games/Dragon.py | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Games/Dragon.py diff --git a/Games/Dragon.py b/Games/Dragon.py new file mode 100644 index 0000000..1468375 --- /dev/null +++ b/Games/Dragon.py @@ -0,0 +1,45 @@ +import random +import time + +def displayIntro(): + print('You are in a land full of dragons. In front of you,') + print('you see two caves. In one cave, the dragon is friendly') + print('and will share his treasure with you. The other dragon') + print('is greedy and hungry, and will eat you on sight.') + print() + +def chooseCave(): + cave ='' + while cave != '1' and cave != '2': + print('Which cave will you go into? (1 or 2)') + cave = input() + + return cave + +def checkCave(chosenCave): + print('You approach the cave...') + time.sleep(2) + print('It is dark and spooky...') + time.sleep(2) + print('A large dragon jumps out in front of you! He opens his jaws and...') + print() + time.sleep(2) + + friendlyCave = random.randint(1, 2) + + if chosenCave == str(friendlyCave): + print('Gives you his treasure!') + else: + print('Gobbles you down in one bite!') + +playAgain = 'yes' +while playAgain == 'yes' or playAgain == 'y': + displayIntro() + + caveNumber = chooseCave() + + checkCave(caveNumber) + + print('Do you want to play again? (yes or no)') + playAgain = input() + From 564f8a4fb05fc3a7e6d5cacf7d63ef5d1289bffd Mon Sep 17 00:00:00 2001 From: Bianca Date: Tue, 3 Apr 2018 16:53:21 -0400 Subject: [PATCH 6/6] Update README.md --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 103fdb3..b314999 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,21 @@ # Simple Stuff -Misc. simple Python projects for teaching myself basic concepts. +Misc. simple Python 3 projects for teaching myself basic concepts. + +Dragon: +Text-based game involving a dragon and two caves. + +DrawCircle: +Draws a circle. + +Guess the Number: +Makes you guess a number. + +Jokes: +Tells you a few jokes. TempConverter: A very simple temperature converter written in Python. (written by me, not using a tutorial) + +