Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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-16

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago