Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

Write these in Pseudocode

#1a – In pseudocode, write a call to a function that passes 1 Integer variable and 1 Integer array, and saves a Boolean value in return.

#1b – In pseudocode, write the function that accepts 1 Integer and 1 Integer array and returns a Boolean.

In the function, search the Integer array with a for-loop, and if the Integer parameter is found in the array, return false. If the Integer parameter is not found, return true.

#2a – In pseudocode, write a call to a module that passes 1 Integer variable, 1 Real variable, 1 String constant, and 1 String literal as arguments.

#2b – In pseudocode, write the module header that accepts 1 Integer, 1 Real, and 2 Strings as parameters.

#3 – This pseudocode has multiple problems. Fix the calling statement and the definition below so that the routine accepts 3 grades as parameters and returns the average into a variable.

Call calcPercentageof(Boolean Number)

Module calcPercentageOf (numerator, num2)

Set percentage = num / num2 * 100

End Module

Write the correct call statement and module definition below:



#4 – In pseudocode, write a for-loop that decreases from 100 to 2 by 2s. Inside the loop, print the value of the loop variable unless the value is from 60 to 80 (inclusive). Use only 1

if-statement. Do NOT write Python code!

Write your answer below:

#5 – Review the decision structure given below.

If myAnswer > 20 Then

myAnswer = myAnswer - 25

Else If myAnswer <= 5 Then

If myAnswer < 0 Then

myAnswer = 10

If myAnswer < 3 Then
myAnswer += 10

Else

myAnswer += 1

Else

myAnswer = 9

If myAnswer < 10 Then

myAnswer += 1

Display myAnswer

What are the results displayed when the decision structure above executes for each given value below:

If myAnswer = 6 then myAnswer =

myAnswer = 15 then myAnswer =

myAnswer = 30 then myAnswer =

myAnswer = 2 then myAnswer =

myAnswer = -1 then myAnswer =

Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
    Recommended textbooks for you
    Text book image
    Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Text book image
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Text book image
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    Text book image
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education