Question: Homework Question help 1. Given the numeric value 338,788.7768 , in the space provided enter the currency value which would be generated by the appropriate

Homework Question help

1. Given the numeric value 338,788.7768, in the space provided enter the currency value which would be generated by the appropriate Visual Logic function.

2. Given the following pseudocode:

start Declarations num departmentCode = 5 string departmentName = "CSCI" ... if (departmentCode = "5") then output "The department is: ", departmentName endif stop

a.

The program displays the message: The department is: CSCI

b.

The program displays the message: The department is:

c.

The pseudocode has an illegal comparison.

3. Given the following pseudocode:

start Declarations num employeeSalary = 35000.0 num clerkSalary = 29000.0 num dentistSalary = 300000.0 if (clerkSalary > dentistSalary) AND (employeeSalary < dentistSalary) then output "true." else output "false." endif stop

a.

The program displays the message: true.

b.

The program displays the message: false.

4. Given the following pseudocode:

start ... (set of instructions before the if-statement)

if 21 > 21 then ... (instructions in the if-statement) endif ... (set of instructions after the if-statement) stop

Does the condition stated in the if-statement contribute to the overall solution of the problem?

a.

Yes, the condition stated in the if-statement contribute to the overall solution of the problem.

b.

No, the condition stated in the if-statement does not contribute to the overall solution of the problem.

5. The following two pseudocode if-statements are equivalent: if A < B AND C > D then output "A < B and C > D." endif if A < B then if C > D then output "A < B and C > D." endif endif

True

False

6. Given the following pseudocode:

start Declarations num employeeSalary = 35000.0 num clerkSalary = 29000.0 num dentistSalary = 300000.0 if (clerkSalary > dentistSalary) OR (employeeSalary < dentistSalary) then output "true." else output "false." endif stop

a.

The program displays the message: true.

b.

The program displays the message: false.

7. When using Visual Logic, the rounded value of the expression 21/2 + 3.9 / 7.8 is:

8. Given the following pseudocode:

start Declarations num TAX = 0.9 num HIGH_PAY_BRACKET = 250000.0 num annualSalary string stateName output "Enter the annual salary: " input annualSalary output "Enter the name of the state: " input stateName if (annualSalary > HIGH_PAY_BRACKET OR stateName) then output "The person is reach." else output "The person is poor." endif stop

a.

The program displays the message: The person is rich.

b.

The program displays the message: The person is poor.

c.

It is not possible to predict the output.

d.

The pseudocode has an invalid statement.

9. Given the following pseudocode:

Declarations num counter = 0 num TAX = 0.07 while NOT (counter < 5) output "The tax value is: ", TAX counter = counter + 1 endwhile

a.

The program displays 5 times the message: The tax value is: 0.07

b.

The program displays 4 times the message: The tax value is: 0.07

c.

The program displays nothing.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!