Need help @PYTHON

5 posts Page 1 of 1
Contributors
User avatar
Master M1nd
Top Poster
Top Poster
Posts: 82
Joined: Thu Aug 15, 2013 7:51 pm

Need help @PYTHON
Master M1nd
ASSLAM-O-ALAIKUM | HELLO

I've start learning Python and I am learning from Codeacademy.com! going great! It's Fun + a little difficult :|

I am stuck at Conditionals and Control Flow ( 5/15 section! )

5 is nothing, the real things start from 6!
http://www.codecademy.com/courses/pytho ... 0003000096

I Don't Understand, How We Come to know about True and False etc!
by solving the given expressions ?
Well i just passed it by seeing from their forum page and thought it is not important!
http://www.codecademy.com/forum_questio ... 1b820008bf
But on the next lesson same thing with or so i come here to ask from you guys! :ugeek: :ugeek:
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Need help @PYTHON
comathi
From what I remember doing this same exercise a while ago, they want you to assign either True or False to the statements under the comments containing a comparison.

For the comments containing boolean values (True and False), you must assign an expression that produces the desired value.

For example:
Code: Select all
# 2**3 == 108 % 100 or 'Cleese' == 'King Arthur'
bool_one =True 
Because 2^3 is 8, 108 mod 100 is 8, this part of the statement is True.
Because 'Cleese' is not the same as 'King Arthur', this part of the statement is false.

However, the logical operator used is or, meaning only part of the statement needs to be True. So True or False = True.

Then:
Code: Select all
# True or True
bool_four = 1==1 or 2==2
They want you to produce 2 expressions that are True, so 1 equals 1 or 2 equals 2 are always True.
User avatar
Master M1nd
Top Poster
Top Poster
Posts: 82
Joined: Thu Aug 15, 2013 7:51 pm

Re: Need help @PYTHON
Master M1nd
Yea thanks,

Well It Looks Difficult But if you concentrate then it's easy goofy;
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Need help @PYTHON
comathi
Python's a very fun language to learn and relatively easy when you compare it to other languages.

With a bit of time and concentration you'll get the hang of it. Codecademy is definetely a good place to start, but Python's documentation is absolutely the go-to place for all official info :)
User avatar
Master M1nd
Top Poster
Top Poster
Posts: 82
Joined: Thu Aug 15, 2013 7:51 pm

Re: Need help @PYTHON
Master M1nd
Yea I also see that it's easy from other languages, But little bit difficult for me because i am first time learning any type of scripting language goofy;
5 posts Page 1 of 1
Return to “Help & Support”