Predict the output if the value of N2 is “Raavan”
N1=”Raavan”
N2=input(“Enter your name”)
print(N1==N2)
print(N1 is N2)
Answers
Answered by
1
Answer:
Errors.
Explanation:
print(N1==N2) there are so many things wrong with this line,
you cannot print a conditional statement,
And if that is just a sentence then you must specify it as string as in,
print("N1==N2").
If you want to mention a condition you must write it as,
if N1==N2:
Then the further instructions to be managed.
Here's a rectified version of this code (If you're having trouble viewing it, use the image):
______________________________________
N1="Raavan"
N2=input("Enter your name: ")
if (N1==N2):
print("N1 is N2")
_______________________________________
Attachments:
Similar questions
Social Sciences,
2 months ago
Social Sciences,
2 months ago
English,
2 months ago
Math,
4 months ago
Science,
4 months ago
Math,
10 months ago
Math,
10 months ago