write this in pseudocode  #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 =        #6 – 2-dimensional arrays can be thought of as containing rows and columns. What are the subscript values for a 2-dimensional array?  Enter them in the array below (first set given)                                                                                 [0,0] [   ] [   ] [   ] [   ] [   ] [   ] [   ] [   ]  [   ] [   ] [   ] [   ] [   ] [   ]

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

write this in pseudocode 

#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 =   
 
 

#6 – 2-dimensional arrays can be thought of as containing rows and columns. What are the subscript values for a 2-dimensional array? 
Enter them in the array below (first set given)                                                                                

[0,0] [   ] [   ]
[   ] [   ] [   ]
[   ] [   ] [   ] 
[   ] [   ] [   ]
[   ] [   ] [   ]

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

In Pseudocode 

#7 – List 4 main data types we used in this course and describe the data that is stored in each one. List examples of variable names that make sense for each data type.



 

#8 – Debug this input validation function and fix it. There is a lot wrong with it! 

 

Function Integer getNumberGreaterThanX(msg, x)

myInteger = getInteger(msg)

While myInteger < x 

Display "The number must be < “, myInteger , “. Try again."

Input x

End While

 

End Function

 

Write the corrected function below:

 

 

 

#9 – Write a validation function based on the provided variables and call statement below. The validation function should return an Integer value greater than zero or print an error message until an acceptable value is entered.

 

Declare Integer positiveValue = 0

Declare String message = "Enter the year you were born (no negative numbers!)"

 

positiveValue = getNumberGreaterThanZero(message)

         

 Write the function definition below:

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Mathematical functions
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education