Skip to content
Open
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion Lab 01 - Calculator/lab_01_part_a.py
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
#
#!/usr/bin/env python3
# Lab 01
# Lauren Boehme
# 11/1/17

F=int(input('Enter temperature in fahrenheit: '))
C=(F-32) * .5556

print('The temperature in celcius: ', c)
12 changes: 11 additions & 1 deletion Lab 01 - Calculator/lab_01_part_b.py
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
#
#!/usr/bin/env python3
# Lab 01
# Lauren Boehme
# 11/1/17

print('Area of a trapezoid: ')
height= int(input('Enter the height of a trapezoid: '))
base= int(input('Enter the length of the bottom base: '))
top= int(input('Enter the length of the top base: '))
A= 1/2 *(base+top) * height
print('There area is: ', A)
10 changes: 9 additions & 1 deletion Lab 01 - Calculator/lab_01_part_c.py
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
#
#!/usr/bin/env python3
# Lab 01
# Lauren Boehme
# 11/1/17

PI = int(3.14159)
radius=int(input('What is the radius of the circle? ')
circle_rad = PI * (radius)**2
print(circle_rad)
58 changes: 57 additions & 1 deletion Lab 03 - Create a Quiz/main_program.py
Original file line number Diff line number Diff line change
@@ -1 +1,57 @@
#
#!/usr/bin/env python3
# The Dank Quiz
# Lauren Boehme
# 11/3/17
# Defining Score variables
x = 0
score = x

# Question 1
print("Who is impossible to defeat?")
answer_1 = input("a)Sans\nb)Flowey\nc)Asriel\nd)None if you are filled with determination\n:")
if answer_1.lower() == "d" or answer_1.lower() == "None":
print("Correct")
x = x + 1
else:
print("Incorrect, you are filled with determination.")

# Question 2
print("Who is the current president of the United States?")
answer_2 = input("a)Barack Obama\nb)Kanye\nc)A clown\nd)Walugi\n:")
if answer_2.lower() == "c" or answer_2.lower() == "a clown":
print("Correct")
x = x + 1
else:
print("Incorrect , it's orange babyhand clownmcgee. Walugi 2020.")

# Question 3
print("True or False: Dogs are better than cats.")
answer_3 = input(":")
if answer_3.lower() == "true" or answer_3.lower() == "t":
print("Correct")
x = x + 1
else:
print("Incorrect")

# Question 4
print("Whos is the best Smash Bros character?")
answer_4 = input("a)Kirby\nb)Doctor Mario\nc)Olimar\nd)Fox\n:")
if answer_4.lower() == "a" or answer_4 == "Kirby":
print("Correct")
x = x + 1
else:
print("You're wrong- everyone knows that Kirby is the roundest and the strongest.")

# Question 5
print("True or False... Gun is the most powerful enemy in Contra?")
answer_5 = input(":")
if answer_5.lower() == "false" or answer_5.lower() == "f":
print("Correct, watch out for Dog.")
x = x + 1
else:
print("Incorrect, watch out for Dog.")


# Score
score = float(x / 5) * 100
print(x,"correct. That's",score, "%")
55 changes: 54 additions & 1 deletion Lab 04 - Camel/main_program.py
Original file line number Diff line number Diff line change
@@ -1 +1,54 @@
#
#!/usr/bin/env python3
# Princess Theif
# Lauren Boehme
# 11/7/17

import random

print('Welcome to Camel! ')
print('You have stolen a camel to make your way across the great Mobi desert. The natives want their camel back and they are coming after you! Survive the desert and out run the natives. ')

done = False
c_thirst = 0
c_tired = 0
miles_traveled = 0
distance_natives = -20
drinks_canteen = 4


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 and rest.')
print('E. Status check.')
print('Q. Quit.')
print()
usranswer=input('Your choice: ')
if usranswer.upper() == 'Q':
done = True
elif usranswer.upper() == 'E':
print('Miles traveled: ', miles_traveled)
print('Drinks in canteen: ', drinks_canteen)
print('The natives are ', distance_natives, 'miles behind you. ')

elif usranswer.upper() == 'D':
c_tired = 0
print('The camel is happy!')
distance_natives =distance_natives + random_native
elif usranswer.upper() == 'C':
miles_traveled = miles_traveled + random_forward
print('You traveled', str(miles_traveled) + ' miles.')
camel_thirst = camel_thirst + 1
camel_tired = camel_tired + 1
distance_natives = distance_natives + random_native
elif usranswer.upper() == 'B':
print('You traveled', str(random_moderate) + ' miles.')
elif usranswer.upper() == 'A':
11 changes: 11 additions & 0 deletions Lab 06 - Loopy Lab/part_1.py
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# !/usr/bin/env python3
#Lab 6 part one
#Lauren Boehme
#11/15/17

k=10
for i in range(9):
for j in range(i+1):
print(k, end=' ')
k+=1
print(' ', end=' ')
print()
12 changes: 11 additions & 1 deletion Lab 06 - Loopy Lab/part_2.py
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
#
# !/usr/bin/env python3
#Lab 6 part two
#Lauren Boehme
#11/15/17

numb = int(input("Enter number of o's: "))
spaces= (numb*2) - 2
print('o' * ((numb) * 2))
for i in range(1, numb -1):
print('o' + (' '*spaces) + 'o')
print('o'*(numb)*2)
28 changes: 27 additions & 1 deletion Lab 06 - Loopy Lab/part_3.py
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
#
# !/usr/bin/env python3
#Lab 6 part three
#Lauren Boehme
#11/15/17
inValue = int(input('Input integer:'))

base = ' '
for i in range(inValue):
base = ' '+str(2*(inValue-1-i)+1)+base+str(2*(inValue-1-i)+1)+' '

length = len(base.strip())
graph = []
for j in range(inValue):
line = ' '
for k in range(j):
line = ' ' + line + ' '
for i in range(inValue-j):
line = ' '+str(2*(inValue-1-i)+1)+line+str(2*(inValue-1-i)+1)+' '
line = line.strip()
length_temp = int((length-len(line))/2)
for m in range(length_temp):
line = ' ' + line + ' '
graph.append(line)
for j in range(inValue) :
graph.append(graph[inValue-1-j])
for line in graph:
print(line)
73 changes: 72 additions & 1 deletion Lab 06 - Loopy Lab/part_4.py
Original file line number Diff line number Diff line change
@@ -1 +1,72 @@
#
# !/usr/bin/env python3
#Lab 6 part two
#Lauren Boehme
#11/15/17

"""
Pygame base template for opening a window

Sample Python/Pygame Programs
Simpson College Computer Science
http://programarcadegames.com/
http://simpson.edu/computer-science/

Explanation video: http://youtu.be/vRB_983kUMc
"""

import pygame

# Define some colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)

pygame.init()

# Set the width and height of the screen [width, height]
size = (900, 700)
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(WHITE)

# --- Drawing code should go here
pygame.draw.circle(screen, GREEN[150,150],3, 0)


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

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

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



Loading