Ahhhhh conditionals and controls chapter 6 hellllllpppp


#1



https://www.codecademy.com/courses/python-beginner-BxUFN/2/2?curriculum_id=4f89dab3d788890003000096#

its just not going in i understand the code and what i need to do just cant figure the maths

bool_one = 55 < 40 and 24 < 21 False

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

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

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

bool_five = 42 < 42 and 10 * 5 == 50 True

`


#2

It doesn't seem you followed the instruction.

For instance,

  1. Set bool_one equal to the result of False and False. You are meant to simply do:

bool_one = False and False

Please, confirm others.


#3

i was thinking that it needs to be 2 things that generatea false false answer ie 1 > 2 and 2 > 3 is False


#4

Naa... Strictly follow the instructions and see. :slight_smile:


#5

Set bool_one equal to the result of False and False it says to equal a result of a false and false statement


#6

Yes, that's just basic assignment to variables. To see what it does, you could,

print bool_one

and so on.

It's like I say set 1 plus 1 to b.

I've simply said do:

b = 1 + 1

but you know the result of 1 + 1 = 2 which you've set to output in b.

:slight_smile:


#7

did that for the first one and got that but it then goes on to te;ll you what to put in for the rest and thats where the problems start i suppose i could do them one by one in a seperate editor to see if its true of faqlse for each answer


#8

No. You should do it on the same editor.

See bool_one and bool_two .

bool_one = False and False

print bool_one

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

print bool_two

And I got:

False
False
None

#9

ok just downlaoding an editor now will give that a go thanks for the advice


#10

Okay, that's cool.

You could even try that using repl.it. See example repl.it


#11

ok so getting a syntax error is there a special way i need to set up this editor to get the same results as code acadamy


#12

Err... What editor do you use please?

Check the URL I last posted, so you see an online example.


#13

just use the standard python from there website 3 .5 tried it in repl as well came up with this
bool_one = 55 < 40 and 24 < 21 False
Traceback (most recent call last):
File "python", line 1
bool_one = 55 < 40 and 24 < 21 False
^
SyntaxError: unexpected EOF while parsing


#14

Yes, see the error.

At best, you can do: repl.it

Click the run button and see the output of False on the right-hand.


#15

got you dont put the bol in just the thing to geneate the false or true statement
thank you for your patience


#16

ok so i did it in the editor and now its just coming up with a syntax error even though in pythin editor it didnt

took your advice kept it simple 1 > 2 and 2 > 3


#17

omg im so dumb im not supposed to put in wether it is false or not my bad


#18

Yes!
You're welcome :slight_smile:


#19

No. You're not dumb.

Part of the learning. Code on! :slight_smile:


#20

:slight_smile: feel pretty good working it though must admit