Computer Science, asked by keerthiravirk2002, 1 month ago

what is the output of the following snippet? x, y, z = 5,10,8 print (x>z) print((y-5) ==x)​

Answers

Answered by BrainlyProgrammer
36

Answer:-

 \orange{ \tt \: Corrected \: Snippet:-  \green{\begin{cases}  \tt\red{ x, y, z = 5,10,8} \\  \tt \red{print (x>z) }\\  \tt \red{print((y-5) ==x) }\end{cases}}}

Output:-

False

True

Explainaction:-

5>8 condition false so it will print "False"

Now, (y-5)==x

y-5= 10-5=5

Now, 5==5, condition true, it will print "True" in the next line.

Answered by TheUntrustworthy
16

Corrected Snippets:

  • x,y,z=5,10,8
  • print(x>z)
  • print((y−5)==x)

Output:

False

True

Explanation:

5>8

If condition is false

Then it will print "False"

Now:

(y-5)==x

y-5= 10-5=5

Now:

5==5,

If condition is true

It will print "True" in the next line

Similar questions