Login Register


little brain teaser! filter_list
Author
Message
little brain teaser! #1
For the noobies(including myself).

I like doing little games. :troll:

Ok. Let's get started.

Code:
A = 2 A = 6 A = 8 A = 10 A = 20 B = 2 B = 6 B = 8 B = 10 B = 20

Now we've got that out the way. What does a == b equal to and it is true or false? :troll:







Reply

RE: little brain teaser! #2
Please don't mess with Caps and Smalls. If you mean A==B, then It will return True, as A contains 20 and B also contains 20.
[Image: MUJ8qSW.png]
-----------------------------------
Now learning:
Android Development, Java
Working on:
An FTP Client for Android
-----------------------------------

Reply

RE: little brain teaser! #3
This would always be true. A will last be edited by 'A = 20', and B will always be edited last by 'B = 20'.

Hence, it will always be true.

-NinjaKnight-

Reply

RE: little brain teaser! #4
true all the time simple enough i think once you figure out that a=20 and b=20

Reply

RE: little brain teaser! #5
(06-17-2014, 04:01 AM)alok9shm Wrote: Please don't mess with Caps and Smalls. If you mean A==B, then It will return True, as A contains 20 and B also contains 20.

I know but since am on my phone it automatically doed capital letters







Reply

RE: little brain teaser! #6
(06-17-2014, 09:30 AM)root@localhost Wrote:
(06-17-2014, 04:01 AM)alok9shm Wrote: Please don't mess with Caps and Smalls. If you mean A==B, then It will return True, as A contains 20 and B also contains 20.

I know but since am on my phone it automatically doed capital letters
Hmmm.. Variable names in Python are case sensitive. Take care of that.
[Image: MUJ8qSW.png]
-----------------------------------
Now learning:
Android Development, Java
Working on:
An FTP Client for Android
-----------------------------------

Reply

RE: little brain teaser! #7
(06-17-2014, 09:35 AM)alok9shm Wrote:
(06-17-2014, 09:30 AM)root@localhost Wrote:
(06-17-2014, 04:01 AM)alok9shm Wrote: Please don't mess with Caps and Smalls. If you mean A==B, then It will return True, as A contains 20 and B also contains 20.

I know but since am on my phone it automatically doed capital letters
Hmmm.. Variable names in Python are case sensitive. Take care of that.

I know....







Reply

RE: little brain teaser! #8
are you asking for a truth table of some sort?
Pierce the life fibers with your drill.

Reply

RE: little brain teaser! #9
If you create a loop to check every variable in order, the result would be True every time.
If you add all A vars and all B vars the outcome would be the same.
It just depends on how you think about it, their are many answers to this question.

Reply







Users browsing this thread: