Software Development and Programming Careers (Official Discussion Thread)

((ReFleXioN)) EteRNaL

RIP MR. SMOKE
Joined
May 1, 2012
Messages
19,375
Reputation
7,144
Daps
91,717
yall will prolly laugh but i'm stuck on this codecademy python lesson. Conditionals & Control Flow(5/16).....this shyt got me stuck...not even sure what it's asking....looks like i'ma have to brush up on my math:sadcam:
 

Type Username Here

Not a new member
Joined
Apr 30, 2012
Messages
16,368
Reputation
2,385
Daps
32,641
Reppin
humans
yup. have no idea what to do

It's just asking you to read and continue.

The easiest way to remember "and" "or" result is this way:

with "and", both inputs need to be true so the result is true, otherwise it is false

with "or", both inputs need to be false so the result is false, otherwise it is true

think of having a variable called ageOfReflex

and ageOfReflex = 24

Now, I want to do something in the code if you happen to be older than 21 and younger than 30:

if( ageOfReflex > 21 and ageOfReflex < 30):
#do something here

We only do something if both conditions are true. If one of those conditions are not true, the if statement is false and we move on. In this case, ageOfReflex is 24, which is between 21 and 30 so we execute what's inside the if statement.

Now let's say I want to do something if you are younger than 20 or older than 30:

if( ageOfReflex < 20 or ageOfReflex > 30):
#do something here

Now, we do something if any of those two conditions are true. If both are false, the result is false and we move on without doing what you want to do. Since ageOfReflex is 24, it is not smaller than 20 or greater than 30, so we would never execute what we code in the if statement. If ageOfReflex was 33, we would execute it.
 

((ReFleXioN)) EteRNaL

RIP MR. SMOKE
Joined
May 1, 2012
Messages
19,375
Reputation
7,144
Daps
91,717
It's just asking you to read and continue.

The easiest way to remember "and" "or" result is this way:

with "and", both inputs need to be true so the result is true, otherwise it is false

with "or", both inputs need to be false so the result is false, otherwise it is true

think of having a variable called ageOfReflex

and ageOfReflex = 24

Now, I want to do something in the code if you happen to be older than 21 and younger than 30:

if( ageOfReflex > 21 and ageOfReflex < 30):
#do something here

We only do something if both conditions are true. If one of those conditions are not true, the if statement is false and we move on. In this case, ageOfReflex is 24, which is between 21 and 30 so we execute what's inside the if statement.

Now let's say I want to do something if you are younger than 20 or older than 30:

if( ageOfReflex < 20 or ageOfReflex > 30):
#do something here

Now, we do something if any of those two conditions are true. If both are false, the result is false and we move on without doing what you want to do. Since ageOfReflex is 24, it is not smaller than 20 or greater than 30, so we would never execute what we code in the if statement. If ageOfReflex was 33, we would execute it.
ok, after really focusing down, I was able to realize what it's asking. good looking. passed it. but I still feel like i'ma have to get up on my math. it's been so long.
 

Ghost_In_A_Shell

Talk No Jutsu
Joined
Sep 30, 2014
Messages
2,746
Reputation
762
Daps
5,642
That's actually the language I started off with before I moved on to Javascript. It's being used a lot now in universities. Are you using version 2 or 3?

Right now I am going by the information of code academy....but I think it's is three....
 

Ghost_In_A_Shell

Talk No Jutsu
Joined
Sep 30, 2014
Messages
2,746
Reputation
762
Daps
5,642
Okay....my biggest dream is to create an Dark African fantasy mmorpg with a technical set up like a browser based online multi-player that has minimal down-loading (like
Begone)..

......I know so many legends and morally ambiguous characters that can come from the African diaspora and I grow tired of cliche lore.....
 

Sane

All Star
Joined
Dec 10, 2013
Messages
4,718
Reputation
1,320
Daps
8,477
Reppin
London Town
Okay....my biggest dream is to create an Dark African fantasy mmorpg with a technical set up like a browser based online multi-player that has minimal down-loading (like
Begone)..

......I know so many legends and morally ambiguous characters that can come from the African diaspora and I grow tired of cliche lore.....
That would be :whoo::blessed:.
It's time to get started on this dream of yours and make it a reality :ufdup:
 

Ghost_In_A_Shell

Talk No Jutsu
Joined
Sep 30, 2014
Messages
2,746
Reputation
762
Daps
5,642
That would be :whoo::blessed:.
It's time to get started on this dream of yours and make it a reality :ufdup:



...ugh ....but I do not know where to begin........... Its like I already have character and story design down..I just have to come up with tech know how
 

Sane

All Star
Joined
Dec 10, 2013
Messages
4,718
Reputation
1,320
Daps
8,477
Reppin
London Town
...ugh ....but I do not know where to begin........... Its like I already have character and story design down..I just have to come up with tech know how
I dunno to much about game programming myself. But you gotta do your research.
Anyway what programming language are you coding in or learning to code in?
 

((ReFleXioN)) EteRNaL

RIP MR. SMOKE
Joined
May 1, 2012
Messages
19,375
Reputation
7,144
Daps
91,717
just realized im barely on an arithmetic level in math:sadcam:.....i completed algebra in high school but haven't used none of that shyt in like 10 years. went to khan academy and tried some sample problems and I was like :merchant:.....so first things first....i'ma get my ass back to up algebra knowledge or higher, then really crack down on this programming shyt.
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,298
Reputation
5,571
Daps
83,581
Okay....my biggest dream is to create an Dark African fantasy mmorpg with a technical set up like a browser based online multi-player that has minimal down-loading (like
Begone)..

......I know so many legends and morally ambiguous characters that can come from the African diaspora and I grow tired of cliche lore.....

Purchase Rpgmaker and play around with that. You will have to learn ruby to use it. If you want to make a browser-based rpg, it will require javascript/html/css

http://store.steampowered.com/app/220700/
 
Last edited:

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,298
Reputation
5,571
Daps
83,581
Took a little break from programming because you can get to the point where you burn yourself out by trying to force it too much. I'm back on it and have been trying to understand more advanced Javascript functionality such as how to implement various design patterns and some of these functional concepts.

Something that is blowing my mind, but that I'm starting to come to grips with is returning functions in functions and how functions can also accept functions as arguments. Functions that use other functions as arguments are called 'higher-order' functions.
 
Top