This assignment consists of five problems. Use the examples reviewed in class as
ID: 3743778 • Letter: T
Question
This assignment consists of five problems. Use the examples reviewed in class as a guide to develop the required pseudo-codes. Please upload a single document to Canvas. Problem 1-20 points Write the pseudo-code of an algorithm that reads a list of numbers form the user and prints the numbe of zeroes in the list. As an example if the program reads X (1,0, 2,0,3, 0], the algorithm should print the number 3. Problem 2-20 points Write the pseudo-code of an algorithm that reads two lists of numbers form the user and prints "TRUE" if the lists are equal, and "FALSE" if not. Assume that both lists are of the same length. As an example if the algorithm reads X> [1, 0, 2, 0, 3, 0] andYs [1, 0, 3, 2, 3, 0], the algorithm should print "FALSE". Problem 3-20 points Write the pseudo-code bf an algorithm that reads a list of numbers containing the final grades of a given group of students in some course (on a 100-point scale). The algorithm should print a list with the corresponding letter grade for each student. As an example if the algorithm reads [93.2, 69.8, 78.3, 82.6, 95.1, 59.4), the output should be [A C, C, B, A, F. Problem 4 20 points Write the pseudo-code of an algorithm that reads a positive integer as an input and prints how many digits the input number has. For instance, if the user enters 234, the algorithm should print 3. Problem 5-20 points Write the pseudo-code of an algorithm that reads (1) a list X of length n, and (2) a list Y of length m s n. Assume that Y is populated with all different integers between O and n 1. The algorithm should print the surn of the elements in x with indexes li e.ndexed in . For instance, ifx-1.3 2.6.3 9 7 5 and Y [0,3, 6, 2) the algorithm should print .-X,-X-. #1-6 + 7 . 2-16Explanation / Answer
If you post more than 1 question, as per chegg guidelines I have to sove only first question.
Ques 1.
Function countZeores()
BEGIN
X = ask user to enter a list consisting of numbers
// store the number of zeroes
Count = 0
// traverse the list X
for i = 1 to X.length()
BEGIN
// if current element is 0
If X[i] == 0
BEGIN
Count = count + 1
END
END
Print(count)
END