Boolean "AND": Unsure if I'm doing this as intended


#1



Python- Conditionals and Control Flow: 6. And


My code returned correct

I was unsure if the point was to solve each item and enter false and true into the code, or simply copypasta the values from the left. I copypasta'd the variables and wrote compatible statements where "true" and "false" were necessary. That seemed a bit like cheating but submitted code was accepted and it moved me on to the next lesson. Did I do this the way it was intended, or was I supposed to solve the variables and sub in true and false?


bool_one = 1 > 2 and 2 > 3

bool_two = -(-(-(-2))) == -2 and 4 >= 16**0.5

bool_three = 19 % 4 != 300 / 10 / 10 and 2 == 2

bool_four = -(1**2) < 2**0 and 10 % 10 <= 20 - 10 * 2

bool_five = 1 < 2 and 2 < 3


#2

if you want to do it right, you should manually evaluate the conditions and give bool_one (or any other) a value of True or False, so for example for bool_one it should be:

bool_one = False

what you do is a bit cheating, many people do, some because they don't fully understand and the exercise approves the cheating, which doesn't help


#3

I understand. The instructions were not very clear, and the hint helped only with doing the math. Thank you!


#4

the instructions are right, but you have to read them very carefully indeed. I see many people get it wrong


#5

i was in the same boat! i think they are teaching how to read the instruction really well! i was trying everything until i got it right
:slight_smile: good luck


#6

I feel like these instructions are very unclear and should be re-written by Codeacademy.
Furthermore, I'm not expert at math but these problems seem rather difficult when I'm just trying to learn the basics of Python, not googling math lessons in the other tab. They should simplify the actual problems that the practice uses to be less intimidating.


#7

yes, but you will see this real life as well. Getting projects from clients you have to be good at understanding what they want, there are plenty of picture like this:

on the internet, there is more truth to it then you expect


#8

Really? thanks for sharing!


#11

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.