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...

Get inspired and start your paper now!