Investigate
Look at the code on the right.
Run it and see what it does.
Click on the pencil icon at the top to see the code again.
Change the values of firstNumber and secondNumber. What happens?
Look down at the "Extra" section. Can you understand what AND OR NOT does?
Run the program. What input do you need to get the output "Access Granted"?
Change it so the secret password is now a number.
Change either line 2 or line 4 to turn it into integers, so it can be compared as integers.
print("Is the first number greater?", firstNumber > secondNumber)
print("Is the first number greater or the same?", firstNumber >= secondNumber)
print("Is the first number smaller?", firstNumber < secondNumber)
print("Is the first number greater or the same?", firstNumber <= secondNumber)
print("Are both numbers the same?", firstNumber == secondNumber)
print("Are the numbers different?", firstNumber != secondNumber)
#----------EXTRA----------------------
# AND checks both comparisons. If BOTH are True, it returns "True"
print(firstNumber < secondNumber and thirdNumber < forthNumber )
#OR Checks both Comparisons. If at least one comparison is true, it returns "True".
print(firstNumber < secondNumber and thirdNumber < forthNumber )
#NOT reverses the answer. If it would be "True", it outputs "False"
print(not firstNumber < secondNumber)
secretPassword = "Password!"
myGuess = input("What is the password? ")
if secretPassword == myGuess:
print("Access Granted. Your input is exactly the same as the password")
print("Access Denied. Your input is not exactly the same as the secret password.")