Question

In: Computer Science

Design a program using a flowchart or pseudocode that accepts a person’s loyalty card number and...

Design a program using a flowchart or pseudocode that accepts a person’s loyalty card number and amount spent in the store last month. Display the data only if the customer is a high spender – a person who spent more than $1000 in the store.

A program that accepts customer info continuously until a sentinel value is entered and displays a list of high spenders.

Solutions

Expert Solution

PseudoCode:

while(1) {
  exitProgam = false
   print("Do you want to check if a person is high spender? (y/n)")
   List listOfHighSpenders; //list of high spenders
   input = read()
   switch(input) {
       case "y": print("Enter the person’s loyalty card number")
               card_num = read()
               print("Enter the amount spent in the store last month")
               amount_spent = read()
               //check if the person spent more than 1000
               if(amount_spent > 1000)
                   listOfHighSpenders.add(card_num)
               break;
      
       case "n": exitProgam = true
               break;
//wrong input
       default: print("Please enter y or n")
   }

//To stop taking input from the user if thte input is "n"
   if(exitProgam)
       break;
}

//Displaying the high spenders
for(spender_card_num in listOfHighSpenders) {
   print(spender_card_num)
}


Related Solutions

DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that...
DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in an array and then display the following data: The lowest number in the array. The highest number in the array. The total of the numbers in the array. The average of the numbers in the array. PLEASE AND THANK YOU
create flowchart using Flowgorithm and Pseudocode for the following program example:   Design a program for Jones...
create flowchart using Flowgorithm and Pseudocode for the following program example:   Design a program for Jones College. The current tuition is $12,000 per year, and tuition is expected to increase by 5 percent each year. Display the tuition amount for each year over the next five years (use a looping structure).
Using pseudocode design a number guessing game program. The program should generate a random number and...
Using pseudocode design a number guessing game program. The program should generate a random number and then ask the user to guess the number. Each time the user enters his or her guess, the program should indicate it was too high or too low. The game is over when the user correctly guesses the number. When the game ends, the program should display the number of guesses that the user made.
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Number Analysis Program Design a program that asks the...
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Number Analysis Program Design a program that asks the user to enter a maximum of 20 numbers. The program should store the numbers in an array and then display the following data: -The lowest number in the array. -The highest number in the array. -The total of the numbers in the array. -The average of the numbers in the array. PLEASE AND THANK YOU
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Design a program that...
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Design a program that asks the user to enter a maximum of 20 numbers. The program should store the numbers in an array and then display the following data: 1-The lowest number in the array. 2-The highest number in the array. 3-The total of the numbers in the array. 4-The average of the numbers in the array. PLEASE AND THANK YOU
Create pseudocode for a program for Stumpy's Cell Phone Company that accepts the number of text...
Create pseudocode for a program for Stumpy's Cell Phone Company that accepts the number of text messages for a customer for one month and displays the bill for text messages. If the user enters a negative number the program should display an error message. If the user enters number greater than or equal to 0 your program should call a function that given the number of text messages, returns the amount to be charged. The program will then display a...
Draw a flowchart and pseudocode that accepts three numbers from a user and displays a message...
Draw a flowchart and pseudocode that accepts three numbers from a user and displays a message if the sum of any two numbers equals the third. Make a working version of this program in Python.
-Draw a flowchart and pseudocode for a program that produces a monthly bill for a cell...
-Draw a flowchart and pseudocode for a program that produces a monthly bill for a cell phone customer. -List at least 10 separate modules that might be included. - For example, one module might calculate the charge for daytime phone minutes used. - -Make a working version of this program using Python. Need all of the above answered including the correct code for program using python
Write a Python program that: Create the algorithm in both flowchart and pseudocode forms for the...
Write a Python program that: Create the algorithm in both flowchart and pseudocode forms for the following requirements: Reads in a series of positive integers,  one number at a time;  and Calculate the product (multiplication) of all the integers less than 25,  and Calculate the sum (addition) of all the integers greater than or equal to 25. Use 0 as a sentinel value, which stops the input loop. [ If the input is 0 that means the end of the input list. ]...
Design a program using pseudocode to produce a report showing recommended sale prices. The program should...
Design a program using pseudocode to produce a report showing recommended sale prices. The program should ask the user to enter the item number, last sale date, number of items on hand, current date, item cost and the regular selling price. The program will output the item number, last sale date, days elapsed, number of item on hand, item cost, regular selling price and sales price. If the item has not been placed on sale for the last 30 days,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT