This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brent Phillips | |
# Gist and GitHub Desktop Test | |
# run code: https://www.pythonanywhere.com/gists/9d124642ce56a7b9a71881f3d2d39183/Hello.py/ipython3/ | |
print("hello") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brent Phillips | |
import turtle as t | |
def goto(x, y): | |
t.up() | |
t.goto(x, y) | |
t.down() | |
def box(move, turn, color="black", fill=False, scale=1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brent Phillips | |
# Drawes square using range | |
import turtle as t | |
def goto(x, y): | |
t.up() | |
t.goto(x, y) | |
t.down() | |
def rangebox(move, turn, color="black", fill=False, scale=1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brent Phillips | |
# Drawes square tower | |
import turtle as t | |
def goto(x, y): | |
t.up() | |
t.goto(x, y) | |
t.down() | |
def rangebox(move, turn, color="black", fill=False, scale=1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brent Phillips | |
# CS 5001/5003 Spring 2021 | |
# Draw circle with Graphics Plus, to test setup | |
# Had to download and add graphicsPlus.py file in the same directory as this file | |
import graphicsPlus as gr | |
win = gr.GraphWin("Simple Circle", 400, 400) | |
c = gr.Circle(gr.Point(50, 50),10) | |
mycircle = gr.Circle(gr.Point(100, 150), 20) | |
mycircle.draw(win) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def decline( youngNobles ): | |
print("Vin declines to dance with "+youngNobles.pop() ) | |
def disappointment( suitors ): | |
while len(suitors) > 1: | |
decline( suitors ) | |
return suitors | |
def theBall( characters ): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brent Phillips | |
# CS 5001/5003 Spring 2021 | |
# Two circles, background and fill | |
import graphicsPlus as gr | |
win = gr.GraphWin("Simple Circle", 400, 400) | |
win.setBackground("#072BB8") | |
mycircle = gr.Circle(gr.Point(100, 150), 20) | |
mycircle.setFill("black") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brent Phillips | |
# CS 5001/5003 Spring 2021 | |
# Two rocks, background and fill | |
import graphicsPlus as gr | |
win = gr.GraphWin("Simple Circle", 400, 400) | |
win.setBackground("#072BB8") | |
def rock1(x, y): | |
poly = gr.Polygon(gr.Point(x,y), gr.Point(x + 20,y + 10), gr.Point(x + 40,y + 30), gr.Point(x + 45,y + 42), gr.Point(x + 20,y + 80), gr.Point(x - 20,y + 80), gr.Point(x - 40,y + 40), gr.Point(x - 20,y + 20)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brent Phillips | |
# CS5001/5003 Spring 2021 | |
# Lab 3 | |
# Instructions | |
# Command line arguements example | |
# imports system package | |
import sys | |
# if this file is run in the terminal then list prints file name with brackets aroudn it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bsic user inputs example | |
def userinput(): | |
name = input("what's your name? ") | |
age = input("how old are you? ") | |
print("hello", name, "you are", age) | |
userinput() |
OlderNewer