| View previous topic :: View next topic |
| Author |
Message |
Negima I post too much
Reputation: 6
Joined: 22 May 2007 Posts: 2221
|
Posted: Sun Sep 08, 2013 7:36 am Post subject: anyone good with pseeudocode? |
|
|
having trouble with this problem
The following pseudocode is an example of a ____ structure.
| Code: | get number
while number is positive
add to sum
get number |
A) sequence
B) decision
C) loop
D) nested
I think its a loop im not sure though
edit: now i think its nested, if not then its definirly sequence
also; if anyone could provide any good sites or names of books that could help me learn
|
|
| Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Sun Sep 08, 2013 12:18 pm Post subject: |
|
|
It's just a loop. A while loop is one of your basic control structures.
The code will start by getting a number, say 3, then add it to the sum if it's positive. After adding it gets another number and returns to the top of the loop where it's checked if it's positive or not. This loop continues until a non positive number is entered. So input along with a trace of the sum variable would be like(where > denotes input : denotes out)
| Code: | > 3
: 3
> 7
: 10
> 4
: 14
> 0(alternatively a negative number)
: loop end
|
|
|
| Back to top |
|
 |
savormix How do I cheat?
Reputation: -1
Joined: 26 May 2007 Posts: 3 Location: Vilnius, Lithuania
|
Posted: Mon Sep 09, 2013 12:54 am Post subject: Re: anyone good with pseeudocode? |
|
|
| Major Shake wrote: | having trouble with this problem
The following pseudocode is an example of a ____ structure.
| Code: | get number
while number is positive
add to sum
get number |
A) sequence
B) decision
C) loop
D) nested
I think its a loop im not sure though
edit: now i think its nested, if not then its definirly sequence
also; if anyone could provide any good sites or names of books that could help me learn |
Sequence:
| Code: | do something 1;
do something 2;
do something 3;
do something 4;
do something 2; |
Decision:
| Code: | | if condition then do something; |
| Code: | | if condition then do something 1 else do something 2; |
Loop:
Basically what you've posted.
Nested:
Add a loop to a decision body or vice versa. You can nest these things up to arbitrary depth.
_________________
| Brolock wrote: | private trackers are shit lel
>paying to pirate
top lel |
Last edited by savormix on Mon Sep 09, 2013 12:53 pm; edited 1 time in total |
|
| Back to top |
|
 |
potaters Grandmaster Cheater
Reputation: 72
Joined: 13 Apr 2009 Posts: 969
|
Posted: Mon Sep 09, 2013 9:07 am Post subject: |
|
|
| OP, you are probably one of the worst coders in your class. c'mon.
|
|
| Back to top |
|
 |
teeigeryuh Master Cheater
Reputation: 25
Joined: 13 Oct 2008 Posts: 262 Location: The netherlands
|
Posted: Mon Sep 09, 2013 12:52 pm Post subject: |
|
|
evilguy
this is what you aspire to become?
this is srs question
_________________
ლ(╹◡╹ლ) |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25860 Location: The netherlands
|
Posted: Mon Sep 09, 2013 12:56 pm Post subject: Re: anyone good with pseeudocode? |
|
|
| Major Shake wrote: |
The following pseudocode is an example of a ____ structure.
| Code: | get number
while number is positive
add to sum
get number |
A) sequence
B) decision
C) loop
D) nested
|
Answer E: Who the fuck cares how it's called? I call it a Flubwubjacky and if you disagree I'll fire you
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Mon Sep 09, 2013 12:59 pm Post subject: Re: anyone good with pseeudocode? |
|
|
| Dark Byte wrote: | | Major Shake wrote: |
The following pseudocode is an example of a ____ structure.
| Code: | get number
while number is positive
add to sum
get number |
A) sequence
B) decision
C) loop
D) nested
|
Answer E: Who the fuck cares how it's called? I call it a Flubwubjacky and if you disagree I'll fire you |
sotry of my life T_T
|
|
| Back to top |
|
 |
teeigeryuh Master Cheater
Reputation: 25
Joined: 13 Oct 2008 Posts: 262 Location: The netherlands
|
Posted: Mon Sep 09, 2013 1:00 pm Post subject: Re: anyone good with pseeudocode? |
|
|
| Dark Byte wrote: | | Major Shake wrote: |
The following pseudocode is an example of a ____ structure.
| Code: | get number
while number is positive
add to sum
get number |
A) sequence
B) decision
C) loop
D) nested
|
Answer E: Who the fuck cares how it's called? I call it a Flubwubjacky and if you disagree I'll fire you | no it isn't!!!!!!!!!!!!!!!!!!!!!!!!!!
_________________
ლ(╹◡╹ლ) |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Mon Sep 09, 2013 1:07 pm Post subject: |
|
|
op I don't ever even have taken programming and I can tell you that's a loop with a decision in it so it's just a loop
decisions with loops in them are nested and the other is not even close
|
|
| Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Mon Sep 09, 2013 2:06 pm Post subject: |
|
|
| Sterling Daniel wrote: | evilguy
this is what you aspire to become?
this is srs question |
definitely not. It's just a funny gif from an anime I enjoy.
|
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Mon Sep 09, 2013 3:21 pm Post subject: |
|
|
| Evil_Intentions wrote: | | Sterling Daniel wrote: | evilguy
this is what you aspire to become?
this is srs question |
definitely not. It's just a funny gif from an anime I enjoy. |
>not wanting to be armstrong the strongarm
what is wrong with you
|
|
| Back to top |
|
 |
teeigeryuh Master Cheater
Reputation: 25
Joined: 13 Oct 2008 Posts: 262 Location: The netherlands
|
Posted: Mon Sep 09, 2013 4:01 pm Post subject: |
|
|
| Evil_Intentions wrote: | | Sterling Daniel wrote: | evilguy
this is what you aspire to become?
this is srs question |
definitely not. It's just a funny gif from an anime I enjoy. |
oh sorry
i dont dislike asspies, but i thought u would actually wanted to look like this guy cuz asspies got asspie fetishes/clothing idk???
but rly i dont dislike asspies
_________________
ლ(╹◡╹ლ) |
|
| Back to top |
|
 |
Nirojan How do I cheat?
Reputation: 108
Joined: 16 Sep 2008 Posts: 0 Location: seshville
|
Posted: Mon Sep 09, 2013 5:44 pm Post subject: |
|
|
well i learned one hour of introduction to html today at school so i mean i guess you could say im pretty good at coding
_________________
| Quote: | | yo i b 22 tryna make it in dis rap game but da steetz dont got luv for no wun na mean so im out hea tryna holla at da fams on dis innernet shit u no way i sayin |
|
|
| Back to top |
|
 |
savormix How do I cheat?
Reputation: -1
Joined: 26 May 2007 Posts: 3 Location: Vilnius, Lithuania
|
Posted: Mon Sep 09, 2013 11:13 pm Post subject: |
|
|
| N wrote: | | well i learned one hour of introduction to html today at school so i mean i guess you could say im pretty good at markup |
Fixed that for you. MLs are MLs, not PLs.
_________________
| Brolock wrote: | private trackers are shit lel
>paying to pirate
top lel |
|
|
| Back to top |
|
 |
Nirojan How do I cheat?
Reputation: 108
Joined: 16 Sep 2008 Posts: 0 Location: seshville
|
Posted: Mon Sep 09, 2013 11:26 pm Post subject: |
|
|
| savormix wrote: | | N wrote: | | well i learned one hour of introduction to html today at school so i mean i guess you could say im pretty good at markup |
Fixed that for you. MLs are MLs, not PLs. | i never said i knew about politics
_________________
| Quote: | | yo i b 22 tryna make it in dis rap game but da steetz dont got luv for no wun na mean so im out hea tryna holla at da fams on dis innernet shit u no way i sayin |
|
|
| Back to top |
|
 |
|