Hack #1

  • Create an idea for a simulation and describe it (you don’t actually have to code it just think about/answer the guiding questions).

A simulation that allows people to try on clothes based on their clothing size and body measurements virtually when online shopping

What makes it a simulation?

- people don't have to go through the pain of going in stores and trying on clothes to see if it fits them, instead, they can just go online, put in their measurements and the simulation will tell you if you will fit the piece of clothing

What are it’s advantages and disadvantages?

- you don't have to leave your house to by clothes that fit!

In your opinion, would an experiment be better in this situation?

- It honestly depends on the person, but for me personally, I would prefer a simulation because shopping and trying on clothes in store stresses and grosses me out so for people like me, a clothing try on simulation could be very helpful

Hack #2

Screenshot for quiz score:

Hack #3

  • Describe the rolling dice simulation (answer guiding questions) how this simulation works is by asking for how many die you want to roll first and then giving you a random output from 1 through 6. The purpose of this game is to simulate rolling as many die as you want! I you wanted to roll 50 die, it might be a little hard to find that many die, so a simulation would be better

Hack #4

  • Add a feature onto the rolling dice simulation above
    • ex: a 14-sided dice or expand the purpose of the simulation (hint: use conditionals to make dice part of a game/real life situation)
def parse_input(input_string):
    if input_string.strip() in {"1", "2", "3","4", "5", "6", "7", "8", "9", "10"}:
        return int(input_string)
    else:
        print("Please enter a number from 1 to 10.")
        raise SystemExit(1)

import random

def roll_dice(num_dice):
    roll_results = []
    for _ in range(num_dice):
        roll = random.randint(1, 10)
        roll_results.append(roll)
    return roll_results


num_dice_input = input("How many dice do you want to roll? [1-10] ")
num_dice = parse_input(num_dice_input)
roll_results = roll_dice(num_dice)

print("you rolled:", roll_results) 
you rolled: [8, 7, 4, 8, 5, 10, 7, 10, 3]

Extra Credit

simulating picking petals off of flowers, good it you don't have a flower on hand:)

numPetals = int(input("number of petals"))
while (numPetals > 0):
    numPetals -= 1
    print(numPetals)
    if numPetals == 0:
        print("No More Petals")
# EXTRA BONUS
    if numPetals % 2 == 0:
        print("he loves me")
    if numPetals % 2 == 1:
        print("he loves me not")
9
he loves me not
8
he loves me
7
he loves me not
6
he loves me
5
he loves me not
4
he loves me
3
he loves me not
2
he loves me
1
he loves me not
0
No More Petals
he loves me