Register and join over 40,000 other developers!
Recent Topics
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
-
Job Gig PHP Form Needed
PJohnson - Apr 18 2019 03:55 AM
-
How to make code run differently depending on the platform it is running on?
xarzu - Apr 05 2019 09:17 AM
-
How do I set a breakpoint in an attached process in visual studio
xarzu - Apr 04 2019 11:47 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

3 replies to this topic
#1
Posted 04 March 2012 - 09:36 AM
Please explain to me abouts loops and arrays as if I was 10 yrs old. Having a problem with this.
#2
Posted 04 March 2012 - 10:06 AM
#3
Posted 04 March 2012 - 03:33 PM
Loops: say youre at an amusement park and got $10. Say you found that cool ride you want to go forever. Every ride costs $1. How do you ride the ride as much as possible?
1. Check if you have enough money.
if you have, proceed, otherwise go home.
2. Buy ticket
3. Get in line
4. Ride the ride
5. When done, start over from 1
This is a simple loop in everyday life, this would be a while loop. Something you do ocer and over again until a certain condition is met, in this case, you was out of money.
Arrays is like a little box with several compartments in. In each compartment, you can store only one thing. The compartments all have a number starting from 0 and up to the number of compartments provided when you bought the box (declared the array)
1. Check if you have enough money.
if you have, proceed, otherwise go home.
2. Buy ticket
3. Get in line
4. Ride the ride
5. When done, start over from 1
This is a simple loop in everyday life, this would be a while loop. Something you do ocer and over again until a certain condition is met, in this case, you was out of money.
Arrays is like a little box with several compartments in. In each compartment, you can store only one thing. The compartments all have a number starting from 0 and up to the number of compartments provided when you bought the box (declared the array)
I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.
#4
Posted 04 March 2012 - 03:46 PM
How do I count the loops . Maybe I'm using the wrong terms. How do I trace a Pseudocode? It is Pseudocode not Java. I know it is hard for subject matter experts to 'dumb' down for someone like me but I do need help. I've tried several tutorials still in trouble. Thanks for your help.
a. Show the pseudocode declarations needed to declare two arrays - one an array which contains the names of the family members, and the other an array which contains the savings (i.e. money) held by each family member. The arrays are parallel arrays because the savings shown in the second array for a certain array position are the savings for the family member whose name appears in the same position in the first array.
This is what I put:
Declare Names (10) as Strings
Declare Savings, Total as Float
Declare K as integer[/I]
b. Write a function, which is called from the main module - this function will determine and return the total savings.
I went by an example that was in the book but would like to shorten this. Dont know if its right.
Declare totalSavings as float
Declare K as Int
Set K = 0
Set totalSavings = femaleSiblings(Savings)
Function femaleSavings(Savings) as float
Set femaleSavings = 0
For (K = 0, K<10, K++)
Write “Enter amount of member savings” + (K + 1)
Input Savings[K]
Set femaleSavings= femaleSavings + Savings[K]
End For
End Function
Write + totalSavings
c. Write a function also called from the main module - this function will determine and return the array index containing the largest savings. Your main program should then print the name of the person who holds those savings, as well as the amount.
This is far as I got. Am I on the right track.
Definitely don't know this
Next I need to analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array[/COLOR. Each of these items (sequential code, at least one selection statement, at least one loop, at least one function call, at least one array and associated processing of the array) is required, and must be present in code.
Also design a program that will allow a user to input a list of family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. You may assume that there are no more than 100 living relatives in your family.
Project Deliverables:
•The first delivery is the project plan which provides your problem statements, problem analysis, and how it will comply with the project specifications.
•The final delivery will be your completed project design along with your code comments and comprehensive test plan.
[COLOR="#FF0000"]I know a test plan is just redoing the code with different variables but first I must master the code to do the test
a. Show the pseudocode declarations needed to declare two arrays - one an array which contains the names of the family members, and the other an array which contains the savings (i.e. money) held by each family member. The arrays are parallel arrays because the savings shown in the second array for a certain array position are the savings for the family member whose name appears in the same position in the first array.
This is what I put:
Declare Names (10) as Strings
Declare Savings, Total as Float
Declare K as integer[/I]
b. Write a function, which is called from the main module - this function will determine and return the total savings.
I went by an example that was in the book but would like to shorten this. Dont know if its right.
Declare totalSavings as float
Declare K as Int
Set K = 0
Set totalSavings = femaleSiblings(Savings)
Function femaleSavings(Savings) as float
Set femaleSavings = 0
For (K = 0, K<10, K++)
Write “Enter amount of member savings” + (K + 1)
Input Savings[K]
Set femaleSavings= femaleSavings + Savings[K]
End For
End Function
Write + totalSavings
c. Write a function also called from the main module - this function will determine and return the array index containing the largest savings. Your main program should then print the name of the person who holds those savings, as well as the amount.
This is far as I got. Am I on the right track.
Definitely don't know this
Next I need to analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array[/COLOR. Each of these items (sequential code, at least one selection statement, at least one loop, at least one function call, at least one array and associated processing of the array) is required, and must be present in code.
Also design a program that will allow a user to input a list of family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. You may assume that there are no more than 100 living relatives in your family.
Project Deliverables:
•The first delivery is the project plan which provides your problem statements, problem analysis, and how it will comply with the project specifications.
•The final delivery will be your completed project design along with your code comments and comprehensive test plan.
[COLOR="#FF0000"]I know a test plan is just redoing the code with different variables but first I must master the code to do the test
Also tagged with one or more of these keywords: pseudocode, loop, array
Language Forums →
C# →
Counting the integers frequences in an array entered by the userStarted by AndreMarques, 27 Nov 2017 ![]() |
|
![]() |
||
Language Forums →
PHP →
How Come Variable Not Assigned And Php Knows Where To Look For Value ?Started by uniqueideaman, 06 May 2017 ![]() |
|
![]() |
||
Language Forums →
C and C++ →
help me . c++. ArraysStarted by girl2383, 06 Feb 2017 ![]() |
|
![]() |
||
Language Forums →
C and C++ →
Selecting an element on a 2D arrayStarted by LonelyGuySylar, 18 May 2016 ![]() |
|
![]() |
||
Language Forums →
Java →
Include a specific error, task, problem, or question in your titleStarted by rjb7, 15 Apr 2016 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download