405,156 views
26 votes
26 votes
Galaxian SpaceBooks come in silver, gold, and copper, and diameters of 13’’, 14’’, and 16’’. The local Space Apple store has posted the follwoing sign:

if color == 'gold' or color == 'silver' and size == 13 or size == 16:

print('We have your model in stock')


The Galaxer would like to know what laptop configurations are currently available:


I don't get how the or and works in this problem

User Laurent Payot
by
2.6k points

1 Answer

12 votes
12 votes
They said, if the color of galaxian spacebook is gold or silver and size is 13 or 16, for gold 13 is size and 16 for silver.
User Joe Slater
by
3.2k points