Computer Science, asked by SSSK420, 4 months ago

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 allysia
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