F
@FlashFlame534
RPS WINNER
strategy_name = "winning move 2 times ago"
import random
def move(my_history, their_history):
if (len(my_history) < 2):
return "s"
return findPreviousWinner(my_history, their_history)
def findPreviousWinner(my_history, their_history):
if (my_history[-2] == "r" and their_history[-2] == "p"):
Team 6 idea #1
strategy_name = "I win pick mine, they win I pick theirs. tie = random"
import random
def move(my_history, their_history):
if (len(my_history) == 0):
return "r"
them = theyWin(my_history, their_history)
me = iWin(my_history, their_history)
neither = tie(my_history, their_history)
if me:
Game
import random
class enemyData:
health = {"Goblin": 100, "Orc": 50, "Dragon": 200}
attack = {"Goblin": 10, "Orc": 5, "Dragon": 20}
class playerData:
inventory = ["Small Potion", "Small Potion", "Small Potion", "Medium Potion", "Medium Potion", "Large Potion"]
itemAmounts = {"Small Potion": 20, "Medium Potion": 30, "Large Potion": 75}
armorBonus = {"Weapon": 1, "Helmet": 0, "Chestplate": 0, "Leggings": 0, "Boots": 0}
health = 100
damage = 10
Combo Meal
class reference:
order = []
costTotal = 0
sandwiches = {"beef": 6.25, "chicken": 5.25, "tofu": 5.75}
beverages = {"small": 1.00, "medium": 1.75, "large": 2.25}
fries = {"small": 1.00, "medium": 1.50, "large": 2.00}
def orderUp():
while True:
sandwichType = input("What sandwich would you like? ")
Skyward Grading Calculator
class operations:
def individualCategoryCalculator(testPoints, testOutOf, categoryPoints, categoryOutOf):
return ((categoryPoints + testPoints) / (categoryOutOf + testOutOf)) * 100
def totalClassGrade():
grades = []
categoryWeight = []
finalGrade = 0
working = True