In: Computer Science
You will create a program that will follow the queuing theory of the Barbershop Problem. You will initially create a flow chart for the assignment to be uploaded to the Queuing Theory Flowchart assignment drop box. In this you will use queues and random number generators to complete this project. You will create three queues
You will create a container for the barbers chairs (list) . The wait times for the barbers will be random. Barber one will be the fastest and barber three will be the slowest. Randomize the wait times accordingly.
The cashier wait times will also vary randomly.
Barber wait times.
Cashier wait time
import random
def questions():
name=input("what is your name:")
print("Hello there", name, "l")
choice=random.choice("+ - x")
finish=false
question_number=0
correct_question=0
if question_number < 10/question_number>=0:
number1=random.range(1,10)
number2=random.range(1,10)
print((nmber1), (choice), (number2))
answer=int(input("what is the number answer?"))
question_number=question_number+1
if choice==("+"):
realanswer=number1+number2
if answer==realanswer:
print("Thats the correct answer")
correct_question=correctquestion+1
else:
print("Wrong answer, the answer was", realanswer,"!")
if choice==("x") :
realanswer=number1*number2
if answer==realanswer :
print("Thats the correct answer")
correct_question=correct_question+1
else:
print("Wrong answer, the answer was", realanswer, "!")
elif choice ==("-") :
realanswer=number1-number2
if answer== realanswer:
print("thats the correct answer")
correct_question=correct_question+1
else:
print("wrong answer, the name was", realanswer, "!")
else:
finish=true
else:
print("Good job",name, "! you have finished the quiz")