Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

q1- You run a local store and want to give your sales people a bonus if their monthly sales are between $1,500 and $2,000 inclusively.

q1- You run a local store and want to give your sales people a bonus if their monthly sales are between $1,500 and $2,000 inclusively. You have developed a software application to help. If a sales person generates betwen $1,700 worth of sales, which statement listed below will print out "Congratulations on a great month!"?

If TotalSales >=1500 And TotalSales <=2000 then print("Congratulations on a great month!" End If

If TotalSales > 1500 Or TotalSales < 2000 Then print("Congratulations on a great month!") End If

If TotalSales >=1500 And <= 2000 Then print("Congratulations on a great month!" End If

If TotalSales <=1500 Or TotalSales >=2000 Then print("Congratulations on a great month!" End If

q2-

What is wrong with the following code? #Declare Variables Declare NumItems as integer Declare Test as float Declare Sum as float #Ask user for test score, assign that value to the Test variable #and calculate the sum

Set NumItems = 5 Do While NumItems < 10

print("Enter in the next test score: ") input Test Sum = Sum + Test Loop

The loop will never stop.
The count should start at -1
Sum would not calculate correctly

This should be a For Next Loop.

q3-

What will be displayed if the corresponding code is executed?

set Number = 4 Do Until Number = 8 write "2 + " + Number set Number = Number + 2 Loop

2 + 4 2 + 6
The loop will never execute.
This is an infinite loop.

2 + 2

2 + 4

2 + 8 2 + 10

q4-

What will be the final value of integerSum when the following code is executed:

Declare integerSum As Integer Declare counter as Integer

Set counter = 12 until counter > 10 IntegerSum = integerSum + 2 write integerSum counter = counter + 1 loop

20
22
18
This loop will never execute

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_2

Step: 3

blur-text-image_3

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 Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

Define and measure service productivity.

Answered: 1 week ago