# An Algorithm Which Allows The User To Input A Variable Number Of Examination Marks, Calculates The Average And Prints The Average.

1243 words - 5 pages

Application 1A primary school teacher requires a program that can be used to play a number-guessing game with young children; the aim being to develop logical strategies and practice their understanding of numbers. In this game the computer picks a number between 1 and 100 and gives the child 10 turns to guess the number. After each incorrect try, the computer tells the child whether the guess is too high or too low. If within the ten turns the number is correctly guessed the computer automatically picks a new number and plays the game again with the same child. If the number is not guessed correctly the game is restarted with another child.Application 2Develop an algorithm, again using pseudocode, which allows the user to input a variable number of examination marks, calculates the average and prints the average and the entered examination marks in descending order.Due to these problems we must develop some steps in a pseudocode form which then could be converted into a chosen computer language -possibly Pascal, C++, Fortran, etc. The steps of designing the algorithm for each problem are written in plain English suitable for the user to convert them into a computer language.For Application 1:Step 1: begin processStep 2:Select a number from 1 to 100.Step 3:Repeat the following until 10 times have elapsed. (loop statement)Step 4:Prompt the user to enter a number from 1 to 100 and read it.Step 5:Compare the entered number with the one randomly chosen.Step 6:If the two numbers are equal do. (loop statement)Step 7:exit loopelseStep 8:print weather the number is too high/low from selected one.Step 9:If entered number bigger than selected do (loop statement)Step 10:print: the number is higher.elseStep 11:print: the number is lower.Step 12:If program finished successfully (conditional statement)Step 13:restart the programelseStep 14:end program.For Application 2:Step 1:begin processStep 2:Enter the number of marks and read it; (n marks, to which no mark is smaller than zero)Step 3:Repeat the following n times. (loop statement)Step 4:Prompt the user to enter mark and read it;Step 5:Store mark to array, name it array A and read it;Step 6:Add marks and divide result by n to find the average.Step 7:We assume that we have two arrays. Array A with the marks in any order. Array B where we want the marks in descending order and n the number marks of marks.Step 8:Repeat the following n times with a counter "count" from 1 to n. (loop statement)beginlook for the biggest value in array A;copy biggest value of A in B{count};replace biggest value of A by 0;end.Step 9: If we run this we should end up with:array A full of 0and array B with the marks in descending order.STAGE I: SPECIFY THE PROBLEMThe schematic diagram of an industrial robot arm is shown in Figure 1.bY Axis (x,y)a AcBX AxisFigure 1 Schematic diagram of a of a robot armTo drive the robot gripper to coordinates (x,y), the angles A and B and distance c should be calculated according to the set of equations...

## Find Another Essay On An algorithm which allows the user to input a variable number of examination marks, calculates the average and prints the average.

### The Ideal American. A philosophical essay relating Malcom X's teachings to the average american

1825 words - 7 pages becomes clearer. I do not think of Malcolm X or El-Hajj Malik El-Shabazz as the only type of ideal American. He simply possess most of the traits I established as being an ideal American.How can this be true if one stops to consider the life of Malcom Little? Besides being a drug dealer, he was a murderer, mugger, thief, and consequently a convicted criminal. He was a uncotrollable drug user, and virtual socio path. He was even nicknamed "Satan

### The concept of pride through the eyes of average adults.

696 words - 3 pages very special feeling and that it is something that should be cherished. I oppose in the sense that I believe that pride is not a sin. I think that pride should be encouraged. Not the kind of pride that involves showing off, but the kind of pride that makes you feel like a complete success. I believe that in this day and age, pride is an emotion that is very necessary to have. If I was to have no pride, it would be hard to go day to day without

### This is a psychological analysis of the mind of the average teenager

1748 words - 7 pages Teenage Rebellion: A Characteristic of the Average AdolescentTeenage rebellion is an observable fact among adolescents throughout the globe ranging from ages twelve to nineteen. It is in the life cycle of adolescence that teens begin to try to demonstrate their mature status and gain autonomy over their lives. The fact that teens are not yet adults often causes them to "act out" (engage in delinquent behavior) in order to show that they are

### Not Your Average War: The War of 1812

1037 words - 4 pages Not Your Average War: The War of 1812 Often considered the Second War of Independence, The War of 1812 was a conflict between America and the British Empire. With ongoing battles between England and France in the 19th century (Napoleonic Wars), the infant United States who recently won their independence (1773-1783) found themselves in the middle of a ground-breaking war. The war began to address problems the Americans were having with the

### "What is Democracy" This is an essay written about democracy. It a reaction of an average person as to what democracy means to them. This is not a step by step definition of the political system

1354 words - 5 pages ironies of these facts is that most citizens of democratic countries do not know what the word democracy means and what it represents. "A citizen of America will cross the ocean to fight for democracy, but wont cross the street to vote in a national election." Bill VaughanThe Oxford dictionary defines democracy as government by the people, direct or representative. In Canada we have a representative democracy that allows us to pick our political

### The short story "The Word Love" has made this essay a comparison to the main characters mother and a average mother in the states.

1078 words - 4 pages maternal character's parenting style. The love for her daughter at a younger age shows in her involvement in keeping her daughter happy and close by. These loving feelings appear for her daughter again and again while the main character is young. While in the market place the child was craving for some momphali, a peanut that is sweet roasted. The character's mother allows her to purchase the treat like a mother would buy a piece of candy for her

### A Hero vs An Average Person

1237 words - 5 pages and got the last of his men killed. An example about this from todays time would be if you were demanded by your boss to go and do your work, but you just sat down and didn’t do it you would face the consequences of getting fired, which in Odysseus’ case his mens consequences were death. Overall, his weaknesses cause him to be an average person, and not a hero. In conclusion, a hero can be both someone we admire or someone who inspires us

### Average Rounded Values of the BAC level for people of different weights.

1279 words - 5 pages A linear formula is defined as a mathematical function in which the variables appear only in the first degree, are multiplied by constants, and are combined only by addition and subtraction. A linear formula would be written as y=mx+b. The sets of data I will be determining linear or not are based upon the average rounded values for blood alcohol concentration (BAC) for people of different weights, according to how many drinks they have consumed

### Are College Textbooks Affordable for the Average Student?

545 words - 2 pages As most college students know purchasing textbooks is not at all like shopping at the .99 cent store; in fact it is the complete opposite with books ranging from \$25.00 and some books reaching up to whopping \$400.00 per book. With that in mind; it leads up to the question, can the average college student afford college text books.The College Publisher Network claims "College is already expensive enough and the additional cost of textbooks - ones

### Justice as Fairness versus the Principle of Average Utility. On John Rawl's statement.

2418 words - 10 pages In this essay I will examine the validity of John Rawls' statement that; individuals in the original position (OP) would choose his conception of justice over the principle of average utility. To reach a satisfactory conclusion requires an elaborate groundwork of definitions and concepts, which allows us to illustrate the situation Rawls conceptualized for individuals in the OP, choosing between the two opposing principles of justice. The first

### Catching Criminals: The Importance of Prints

1872 words - 7 pages belong to must give a reason their prints are there. If they do not give a good enough reason then they can be brought up on charges and be convicted of the crime being investigated. Another point that people do not fully recognize is that all prints not just fingerprints are unique. Here recently an interest has been shown in lip prints. According to Janardhanam Dineshshankar, Cheiloscopy is a forensic investigation technique that deals with

## Similar Essays

### To Investigate How The Height Of A Runway Affects The Average Speed Of A Trolley.

4784 words - 19 pages ground not when the front first reached the ground.Variables: -I have decided to investigate how the height of a runway affects the average speed of a trolley because other factors such as surface of wheel are hard to vary. And there is not a large enough range of materials to investigate. The way in which the height of the runway affects the speed of the trolley is an efficient experiment to do. A graph can be plotted easily, there is a large range

### Socialization Throughout The Life Of The Average American And Resocialzation.

662 words - 3 pages our life is predefined in our genes, but the socialization process is a unique opportunity to mold our lives in different directions by being encouraged to adopt certain attitudes and being forbidden to take up others (Baker, 2). It can be conceived that if a group of people has been taught a similar set of core principles, they will likely get along; therefore, socialization can unify a society. Socialization within an age group is important as

### Not The Average Woman: A Character Analysis

1408 words - 6 pages Case StudyJessica Ashwell is an attractive 20-year-old who works full-time at a waitressing/bartending job at the Golden Greek Restaurant and bar. Jessica is also a full time liberal arts and sciences major at Quinnebaug Community College. Along with this she is also working to get an online degree in astrology. Amidst her busy schedule she manages to keep a boyfriend as well.Synopsis of TheoriesThe first theory that I am going to apply to

### Comparitive Essay The Nerd, The Jock, And The Average Man

674 words - 3 pages is very orderly, and his perfect management of his priorities and time have put him ahead of his competitors. Perfection and wealth are his two best buddies. Having been picked on during his high school years, he now cares not what other people think of him as long as he achieves no less than a perfect job. Also because of this, the nerd has developed an inward personality; he socializes solely to his own friends and has trouble grasping the