edhesive code practice 3.3
Answers
Answer:
question 1)x = float(input ("Enter a number: "))
if (x>45.6):
print("Greater than 45.6")
Question 2)
x = float(input ("Enter a number:98 "))
if (x>= 90):
print ("Great!")
Question 3)
pswd = input("Enter the Password: ")
if(pswd=="Ada Lovelace"):
print ("Correct!")
else:
print ("Not Correct")
Explanation:
Hope that helps
Answer:
This is question 1
x = int(input("Enter today's day numerically: "))
if (x == 30 or x == 15):
print("It's payday!")
if (not(x == 30 or x == 15)):
print("Sorry, not a payday.")
This is question 2
red = int(input("Enter the red: "))
if (not(red >= 0 and red <= 255)):
print("Red number is not correct.")
green = int(input("Enter the green: "))
if (not(green >= 0 and green <= 255)):
print("Green number is not correct.")
blue = int(input("Enter the blue: "))
if (not(blue >= 0 and blue <= 255)):
print("Blue number is not correct.")
Explanation:
They both are a 100%