• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/6

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

6 Cards in this Set

  • Front
  • Back
Assume that the following variables contain the values shown:

lowestA = 90
lowestB = 80
lowestC= 70
name= "Louis "
school="washington"
street= "Oak"

For each of the following Boolean expressions, decide whether the statement is true, false or illegal.

a. lowestA = lowestB
b. lowestA <= lowestB
c. lowestC > lowestA
d. lowestA < name
e. name = "Louis"
f. name = school
g. name < school
h. lowestB = "80"
i street = "90"
j. street > school
a. False: They do no equal in value
b. False: It is not less than or equal
c. False: lowestC is not greater than lowestA
d. False: name has no numeric value to compare it too.
e. True: name does equal "Louis"
f. False: name does not equal school
g. False: no numeric values to compare
h. False: there are no quotations around 80 in lowestB, however if that doesn't matter, it would be a true statement.
i. Illegal: alphabetic characters are usually used for street name and not numbers
j. Illegal: these are two variables instead of it being a variable and an identifier.
The happy cow Ice Cream Company manufactures several types of ice cream. Design a flowchart or psuedocode for a program that accepts an ice cream flavor (for example, ("triple chocolate"), price per gallon, and number of gallons sold in the average year. Display a message that indicates whether the ice cream is a bestseller, which is defined as a flavor that sells more than 40,000 gallons per year.
1
The Romance World Cruise Line provides special gifts for passengers who are newlyweds, as well as for those who have been married more than 40 years. Design a pseudocode for a program that accepts a couple's last name, ship cabin number, and number of years married. Display a couple's data with the message "Newlywed Gift" if the couple has been married a year or less, "Deluxe Anniversary Package" if the couple has been married 40 years or more, and no message if the couple has been married between 2 and 39 years.
1
The Daily Gazette accepts classified ads in several categories. For most ads, the newspaper charges 10 cents per word for the first 50 words, and 8 cents per word for every word after that. Design a flowchart for a program that accepts data about an ad: customer name, ad category (for example, Apartment for rent), and number of words. Display all the input data and the price for the ad.

a. Modify the newspaper ad program to provide a 10 percent discount for ads over 300 words.

b. Modify the newspaper ad program to display the details of the ad only if it is inn the Used cars category.

c. Modify the newspaper ad program so the ad is in the Found category, in which case it is free, or in the Business services category, in which case the charge is 20 cents per word.

d. Modify the newspaper as program to accept the ad data, then to prompt the user for and accept an ad category. Display the data only if the ad is in the specified category.
1
The Parasol Insurance Group sells a variety of insurance policy types. Design a flowchart for a program that accepts a client’s name and “Y’ or “N’ string answers to
questions about whether the client wants each of the following policy types: homeowners
($800 annually), renters ($300 annually), and automobile ($1000 annually per car). If the
client wants automobile insurance, add a question to determine the number of vehicles
covered. Display all the details, as well as the client’s annual bill.

a. Modify the insurance program to display a client’s data only if the client selects
automobile insurance.

b. Modify the Insurance program to display a clients data only if the client will pay more than $1200 annually
1
Rick Hammer is a carpenter who wants an application to compute the price of any desk a customer orders, based on the following: desk length and width in inches, type of wood, and number of drawers. The price is computed as follows:

a. The charge for all desks is a minimum $200
b. If the surface (length x width) is over 750 square inches, add $50
c. If the wood is mahogany, add $150; for oak, add $125. No charge is added for pine.
d. For every drawer in the desk, there is an additional $30 charge.
1