Question

You see the following code, but you dont see how the variable x was defined. if x%2 == or x < 0: print(A) elif X%3 =s and

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ans

B C D is printed.

A does not print means both condition false x%2==0 condition get false and x<0 condition get false.

The above two condition indicate that x is odd positive.

B prints that means both condition are true x%3==0 and x>10

means x is odd number greater than 10 divisible by 3

C is printed so x<1000

Then D is printed without checking condition.

So the conclusion about x is:-

.

x is odd number greater than 10 but less than 1000 which is divisible by 3.

.

.

.If any doubt ask in the comments.

Add a comment
Know the answer?
Add Answer to:
You see the following code, but you don't see how the variable x was defined. if...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT