Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Exercise 1: Write the pseudocode to represent the logic of a program that allows

ID: 638798 • Letter: E

Question

Exercise 1:   Write the pseudocode to represent the logic of a program that allows the user to enter a value. The program multiplies the value by 10 and prints the result.  Use the lower case pseudocode methodology for object-oriented coding.

Answer:

Exercise 2:  Write the pseudocode to represent the logic of a program that allows the user to calculate the diameter, circumference and area of a circle. The user will be allowed to enter the radius of the circle. The calculated diameter, circumference and area of a circle would be displayed on the screen on three separate lines. Use 3.14 as pi.  All inputs are entered on separate lines (differs from text).  Use the lower case pseudocode methodology for object-oriented coding.

Answer:

Ex Pseudocode 3:  Write the pseudocode to represent the logic of a program logic that allows the user to calculate the speed that an automobile is traveling.   The user will input the number of miles traveled and the amount of time in hours it took to travel the distance. The distance in miles and the time it took travel this distance will be

Explanation / Answer

1.
Pseudo Code
1. enter a value;
2. Take input value;
3. print value*10;

void show(){
   print 'enter a value';
   n := input();
   print n*10;
}

2.
Pseudo Code
1. Enter the value of radius;
2. Take input the value of radius;
3. print 'diameter is ',radius*2;
4. print 'circumference is ',2*3.14*radius;
5. print 'area is ',3.14*radius*radius;

void cal(){
   print 'Enter the value of radius'
   r := input();
   d = r*2;
   print d;
   c = 2*3.14*r;
   print c;
   a = 3.14*r*r;
   print a;
}

3.
Pseudo Code
1. Enter the value of number of miles travel.
2. Take input the value of number of miles travel.
3. Enter the value of time taken.
4. take the value of time taken.
5. print number of miles/time taken

void cal(){
   print 'Enter miles travel';
   miles := input();
   print 'Enter time taken'
   time := input();
   print miles/time;
}