Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1bbff7b
I made the program
BradyBallmann Nov 1, 2017
800773b
I made the program work
BradyBallmann Nov 1, 2017
5ee54cc
Made the program
BradyBallmann Nov 1, 2017
6c322d1
Answered questions
BradyBallmann Nov 1, 2017
b1eeede
Answered questions on Chapter 2
BradyBallmann Nov 2, 2017
cc22db6
Answered 1 and 2
BradyBallmann Nov 2, 2017
f87bce7
Answered questions for Chapter 3
BradyBallmann Nov 3, 2017
a452fc3
Chapter 3 Main_program
BradyBallmann Nov 3, 2017
41269b0
Answered worksheet_04
BradyBallmann Nov 7, 2017
1a04983
Answered worksheet_04.txt
BradyBallmann Nov 7, 2017
4ec0c51
Lab for chapter 4
BradyBallmann Nov 7, 2017
4d34b74
Chapter 4 Lab 4 (new and fixed)
BradyBallmann Nov 8, 2017
e38dd05
Chapter 05 Worksheet
BradyBallmann Nov 9, 2017
7e4be7d
Started to write the program
BradyBallmann Nov 9, 2017
9c67dd0
Finishes chapter 05 lab added trees sky and person
BradyBallmann Nov 9, 2017
db75034
Merge branch 'master' of https://github.com/LewisAndClark-CSD/program…
BradyBallmann Nov 13, 2017
a47b901
Made * table
BradyBallmann Nov 14, 2017
b7992a8
number triangle
BradyBallmann Nov 14, 2017
639c292
3 side triangle thing
BradyBallmann Nov 14, 2017
f086088
Number diamond is complete
BradyBallmann Nov 14, 2017
e0b12b7
Problems 1-4 worksheet answers
BradyBallmann Nov 14, 2017
e3ea8d3
Created the triangle
BradyBallmann Nov 15, 2017
c4e81d2
Finished questions 5-8 and worksheet is done. Worksheet_06
BradyBallmann Nov 15, 2017
9045524
Finished part_1
BradyBallmann Nov 15, 2017
5a11682
Made the top row for the boxes
BradyBallmann Nov 15, 2017
c5a168d
Printed one of the sides for the boxes
BradyBallmann Nov 15, 2017
9a5c935
Completed chapter 06 Lab part 2
BradyBallmann Nov 15, 2017
438e642
Completed chapter 06 lab
BradyBallmann Nov 16, 2017
f832767
Finished chapter 07 Worksheet
BradyBallmann Nov 20, 2017
c8ae09f
Finished while loop and appending room_list
BradyBallmann Nov 20, 2017
cd5ba0a
Fixed the hardcoding of telling the direction
BradyBallmann Nov 28, 2017
33a50f8
Can get to the diner now
BradyBallmann Nov 28, 2017
c66dd73
Can get to the diner now
BradyBallmann Nov 28, 2017
d8034c1
Finished program added East, South, and West
BradyBallmann Nov 29, 2017
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
11 changes: 10 additions & 1 deletion Lab 01 - Calculator/lab_01_part_a.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
#
#!/usr/bin/env/ python3
# Calculator Part a
# Brady Ballmann
# 11/01/2017

fahrenheit = int(input("Enter a tempature in Fahrenheit: "))

celcius = (fahrenheit - 32) * 5/9

print('The temperature in celcius:', celcius)
6 changes: 6 additions & 0 deletions Lab 01 - Calculator/lab_01_part_a.py.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python3
# Lab 1: Custom Calculators Part a
# Brady Ballmann
# 11/01/2017

fahrenheit = input('
9 changes: 8 additions & 1 deletion Lab 01 - Calculator/lab_01_part_b.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
#
print('Area of a trapezoid')
height = int(input("Enter the height of the trapezoid: "))
length_btm = int(input("Enter the length of the bottom base: "))
length_top = int(input("Enter the length of the top base: "))

area = ((length_btm + length_top) / 2) * height

print('The area is:', area)
9 changes: 8 additions & 1 deletion Lab 01 - Calculator/lab_01_part_c.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
#
import math

print('Area of an equilateral triangle')
area_side = int(input('Length of a side: '))

area = (math.sqrt(3)/4)*(area_side * area_side)

print('The Area of the triangle:',area)
70 changes: 69 additions & 1 deletion Lab 03 - Create a Quiz/main_program.py
Original file line number Diff line number Diff line change
@@ -1 +1,69 @@
#
#!/usr/bin/env python3
# Creating a quiz
# Brady Ballmann
# 11/03/2017

percentage = 0

print('Ready for a quiz? :)')

question_one = input('Who won the 2017 World Series? ')
if question_one.lower() == "astros":
print("Correct!")
percentage += 1
else:
print('Incorrect!')

question_two = int(input("What is 5 * 432 / 4? "))
if question_two == 540:
print("Correct!")
percentage += 1
else:
print("Incorrect!")

print("What is the most common male name in the US?")
print("1. James")
print("2. Robert")
print("3. David")
print("4. Michael")
print("TIP! Enter the number not the name")
question_three = int(input('? '))
if question_three == 1:
print('Correct!')
percentage += 1
else:
print("Incorrect!")


question_four = int(input("What is 10 to the power of 3? "))
if question_four == 1000:
print("Correct!")
percentage += 1
else:
print("Incorrect!")

print('If an apple weighs about 3 and 1/2 ounces. What is the radius of the sun? ')
print("1. 432,288 mi")
print("2. 542,421 mi")
print("3. 674,321 mi")
print("4. 132,424 mi")
print("TIP! Enter the number not the name.")
question_five = int(input('? '))
if question_five == 1:
print('Correct!')
percentage += 1
else:
print("Incorrect!")

percent = percentage * 20
print("You got" , percentage, "out of 5")
print(percent, "percent! Congrats!")









81 changes: 80 additions & 1 deletion Lab 04 - Camel/main_program.py
Original file line number Diff line number Diff line change
@@ -1 +1,80 @@
#
import random

print("Welcome to Camel!")
print("You have stolen a camel to make your way across the great Mobie desert.")
print("The natives want their camel back and are chasing you down! Survive your")
print("desert trek and out run the natives.")

done = False
camel_thirst = 0
camel_tired = 0
miles_traveled = 0
distance_natives = -20
drinks_canteen = 3


random_oasis = random.randrange(1 , 21)

random_forward = random.randrange(10 , 21)

random_native = random.randrange(7 , 15)

random_tiredness = random.randrange(1 , 4)

random_moderate = random.randrange(5, 13)


while not done:
print("A. Drink from your canteen.")
print("B. Ahead moderate speed.")
print("C. Ahead full speed.")
print("D. Stop for the night.")
print("E. Status check.")
print("Q. Quit.")
print()
user_answer = input("Your choice? ")
if user_answer.upper() == "Q":
done = True
elif user_answer.upper() == "E":
print("Miles traveled:", miles_traveled)
print("Drinks in canteen: ", drinks_canteen)
print("The natives are", str(distance_natives) + " miles behind you")
elif user_answer.upper() == "D":
camel_tired = 0
print("The camel is happy :D")
distance_natives = distance_natives + random_native
elif user_answer.upper() == "C":
miles_traveled = miles_traveled + random_forward
print("You traveled", str(miles_traveled) + " miles.")
camel_thirst = camel_thirst + 1
camel_tired = camel_tired + random_tiredness
distance_natives = distance_natives + random_native
elif user_answer.upper() == "B":
print("You traveled", str(random_moderate) + " miles.")
camel_thirst = camel_thirst + 1
camel_tired = camel_tired + 1
distance_natives = distance_natives + random_native
elif user_answer.upper() == "A":
drinks_canteen = drinks_canteen - 1
camel_thirst = 0
elif not done and camel_thirst < 4:
print("You are thirsty")
elif not done and camel_thirst < 6:
print("You died")
done = True
elif camel_tired > 5:
print("Your camel is getting tired")
elif camel_tired > 8:
print("Your camel is dead")
done = True
elif distance_natives >= miles_traveled:
print("The natives have caught you")
done = True
elif miles_traveled >= 200:
print("YOU WON!")
elif random_oasis == 10:
print("You found an oasis")
drink_canteen = 3
camel_thirst = 0
camel_tired = 0

114 changes: 113 additions & 1 deletion Lab 05 - Create a Picture/main_program.py
Original file line number Diff line number Diff line change
@@ -1 +1,113 @@
#
#!/usr/bin/env python3
# main_program for chapter 5 lab
# Brady Ballmann
# 11/09/2017


import pygame

# Define some colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
BLUE = (0, 0, 255)
GREEN = (0, 100, 0)
RED = (255, 0, 0)
YELLOW = (255, 255, 0)
SKY = (135, 206, 250)
BROWN = (139,69,19)
WHEAT = (245,222,179)

pygame.init()

# Set the width and height of the screen [width, height]
size = (700, 500)
screen = pygame.display.set_mode(size)

pygame.display.set_caption("My Game")

# Loop until the user clicks the close button.
done = False

# Used to manage how fast the screen updates
clock = pygame.time.Clock()

# -------- Main Program Loop -----------
while not done:
# --- Main event loop
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True

# --- Game logic should go here

# --- Screen-clearing code goes here

# Here, we clear the screen to white. Don't put other drawing commands
# above this, or they will be erased with this command.

# If you want a background image, replace this clear with blit'ing the
# background image.
screen.fill(SKY)

# These are Lines and they are the tree
pygame.draw.line(screen, BROWN, [10, 600], [10, 400], 10)

pygame.draw.line(screen, BROWN, [85, 600], [85, 400], 10)

pygame.draw.line(screen, BROWN, [160, 600], [160, 400], 10)

pygame.draw.line(screen, WHEAT, [300, 470], [300, 400], 5)

pygame.draw.line(screen, WHEAT, [300, 470], [270, 600], 5)

pygame.draw.line(screen, WHEAT, [300, 470], [350, 600], 5)

pygame.draw.line(screen, WHEAT, [275, 440], [325, 440], 5)

pygame.draw.line(screen, BROWN, [690, 600], [690, 400], 10)

pygame.draw.line(screen, BROWN, [625, 600], [625, 400], 10)

pygame.draw.line(screen, BROWN, [550, 600], [550, 400], 10)

pygame.draw.line(screen, BLACK, [375, 600], [375, 475], 7)

pygame.draw.line(screen, BLACK, [450, 600], [450, 475], 7)

pygame.draw.line(screen, BLACK, [375, 475], [450, 475], 5)




# Circles

pygame.draw.circle(screen, GREEN, (20,350), 65,0)

pygame.draw.circle(screen, GREEN, (90,350), 65,0)

pygame.draw.circle(screen, GREEN, (160,350), 65,0)

pygame.draw.circle(screen, WHEAT, (300,400), 20,0)

pygame.draw.circle(screen, WHITE, (295,395), 3,0)

pygame.draw.circle(screen, WHITE, (305,395), 3,0)

pygame.draw.circle(screen, GREEN, (690,350), 65,0)

pygame.draw.circle(screen, GREEN, (620,350), 65,0)

pygame.draw.circle(screen, GREEN, (550,350), 65,0)

pygame.draw.circle(screen, YELLOW, (20,20), 80,0)


# --- Go ahead and update the screen with what we've drawn.
pygame.display.flip()

# --- Limit to 60 frames per second
clock.tick(60)

# Close the window and quit.
pygame.quit()

7 changes: 6 additions & 1 deletion Lab 06 - Loopy Lab/part_1.py
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@

start = 10
for row in range(9):
for column in range(row+1):
print(start ,end=" ")
start+=1
print()
18 changes: 17 additions & 1 deletion Lab 06 - Loopy Lab/part_2.py
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
#
#!/usr/bin/env python3
# part_2 of chapter 6 Lab
# Brady Ballmann
# 11/15/2017

# Input statement for the o's
numberos = int(input("How many o's do you want? "))


# Print for the top of the box
print('o'*(numberos*2 ))
# Loop for the spaces
for i in range(numberos -2):
print("o" + ' '*(numberos*2 -2 ) + 'o')
# Print the bottom o's
print('o'*(numberos*2))

Loading