Edhesive 3.4 Code Practice: Question 2
Answers
Answered by
146
Answer:
Explanation:
n = float(input("Enter the Numerator: "))
d = float (input("Enter the Denominator: "))
if (d != 0):
print ("Decimal: " + str(n/d))
else:
print("Error - cannot divide by zero.")
Answered by
0
Following are the solution to the given question:
n=input("Enter any string value: ")
if(n=="Yellow"):
print("It's match")
else:
print("Error")
Output:
Enter any string value: Yellow
It's match
Explanation:
Please find the explanation in the attached file.
Attachments:
Similar questions