from random import *

def randomnum(): # function for generating random int
    x = randint(0,255)

def convert(dec):
    x = dec
    i = 7
    bin = []
    while i >= 0:
        if (x - 2 ** i) >= 0:
            bin.append(1)
            i -= 1
        else:
            bin.append(0)
            x -= 2**i
            i -= 1
    print(bin)
    

def survivors(): # function to assign position
    survivorList = ["Jiya", "Shruthi", "Noor", "Ananya" , "Peter Parker", "Andrew Garfield", "Tom Holland", "Tobey Maguire"]
    survivorChance = convert(randomnum())
    return[survivorList[i] for i in range(8) if survivorChance[i] == 1]
    # replace the names above with your choice of people in the house
def currentSurvivors(newSurvivors):
    newsurvivors = survivorList
    print("The survivors of the apocalypse are...")
    for i in survivorList:
        print("\t - {}".format(i))

survivorList = survivors()
currentSurvivors(survivorList)
import getpass, sys


QUESTIONS = {

    "What is used to create parameters in Python?": [
     "def", 
     "define" 
    ],



    "Where are the secrets stored in your VSCode?": [
    "_config.yml", 
    "config.yml", 
    "config"
    ],



    "True or false: We can use docx files in our Fastpages site?": [
    "true", 
    "false", 
    "what in the world is docx?"
    ],



    "True or false: Static Text often changes when you run code": [
    "false", 
    "true", 
    "idk" 
    ],



    "True or false: A sequence of code is only used on the AP exam and it is used to refer to mulitple lines of code": [
    "false", 
    "true", 
    "what's a sequence?" 
    ],



    "Can we get an A in this class AND keep our sanity?": [
    "no", 
    "yes",  
    "maybe"
    ],



    "What is the syntax for remotely opening a file in VSCode from Terminal?": [
    "code .", 
    "Code.", 
    ". Code"
    "code."
    ],



    "What do we call the defining parameters we set at the top of a markdown file or jupyter notebook?": [
    "front matter", 
    "define"
    ],



    "What is the name of the piece of code that lets you access and bring in other people's code?": [ 
    "import",
    "port",
    "rejuvenate"
    ],



    "What is the teacher's social security number?": [
    "how is that relevant", 
    "idk", 
    "why is this even a question", 
    "5014"
    ],
}




for question, alternatives in QUESTIONS.items():
    correct_answer = alternatives[0]
    for alternative in sorted(alternatives):
        print(f" - {alternative}")




    answer = input(f"{question}? ")
    if answer == correct_answer:
        print("yay you got it right! here's your bronze medal!")
    else:
        print(f"LOL imagine getting it wrong. The correct answer was {correct_answer!r}, not {answer!r}")