Question

In: Computer Science

Develop a python program that will determine if a department store customer has exceeded the credit...

Develop a python program that will determine if a department store customer has exceeded the credit limit on a charge account. For each customer, the following facts are available:

 Account number  Balance at the beginning of the month  Total of all items charged by this customer this month  Total of all credits applied to this customer’s account this month  Allowed credit limit

The program should input each of the facts, calculate the new balance (=beginning balance + charges – credits), and determine if the new balance exceeds the customer’s credit limit. For those customers who credit limit is exceeded, the program should display the customer’s account number, credit limit, new balance and the message “Credit limit exceeded”.

Solutions

Expert Solution

Answer: hi! Find your solution here. This program will input takes for account number, balance begining of the month, charges of the month, credits applied on this month and credit limit then calculate new balance. If new balance is greater than credit limit then dispaly all information of the account holder. If you have any query , feel free to ask me. Thanks.

#takes input form user for account number

account_number = int(input("enter account number: "))

#takes input begining balance
bal_begining_of_month = float(input("Enter balance begining of the month: "))

#total charges will takes input
charged_items = int(input("Enter Total of all items charged by this customer this month: "))

#total credits input from user
credit = float(input("Total credit applied of this month: "))

#takes input for credit card limit
credit_limit = float(input("Enter credit card limit: "))

#calculate new balance

new_balance = bal_begining_of_month + charged_items
new_balance = new_balance - credit

if new_balance>credit_limit: #check whether new balance is greater than limit then print all information
print("Account number: ",account_number)
print("Credit Limit: ",credit_limit)
print("New Balance: ",new_balance)
print("Credit card limit exceeded")

#if false condtion then print new balance

else:
print("New Balance: ",new_balance)


Related Solutions

A customer comes into a grocery store and buys 8 items. Write a PYTHON program that...
A customer comes into a grocery store and buys 8 items. Write a PYTHON program that asks for the name of the item and the price of each item, and then displays these on the screen. Refer to the print() and input() statements covered in the module. Do NOT use loops as it will be covered in later modules. Apples 2.10 Hamburger 3.25 Milk 3.49 Sugar 1.99 Bread 1.76 Deli Turkey 7.99 Pickles 3.42 Butter 2.79
Python: Write a program to simulate the purchases in a grocery store. A customer may buy...
Python: Write a program to simulate the purchases in a grocery store. A customer may buy any number of items. So, you should use a while loop. Your program should read an item first and then read the price until you enter a terminal value (‘done’) to end the loop. You should add all the prices inside the loop. Add then a sales tax of 8.75% to the total price. Print a receipt to indicate all the details of the...
A customer has purchased 15 items in a department store.
A customer has purchased 15 items in a department store. Write a code segment to read the unit price and the quantity of each these 15 items and to compute and print its price (which is the unit price times the quantity). Also compute and print average price of the 15 items.
The Customer Service Center in a large New York department store has determined that the amount...
The Customer Service Center in a large New York department store has determined that the amount of time spent with a customer about a complaint is normally distributed, with a mean of 9.9 minutes and a standard deviation of 2.4 minutes. What is the probability that for a randomly chosen customer with a complaint, the amount of time spent resolving the complaint will be as follows. (Round your answers to four decimal places.) (a) less than 10 minutes (b) longer...
The Customer Service Center in a large New York department store has determined that the amount...
The Customer Service Center in a large New York department store has determined that the amount of time spent with a customer about a complaint is normally distributed, with a mean of 9.9 minutes and a standard deviation of 2.7 minutes. What is the probability that for a randomly chosen customer with a complaint, the amount of time spent resolving the complaint will be as follows. (Round your answers to four decimal places.) (a) less than 10 minutes (b) longer...
The Customer Service Center in a large New York department store has determined that the amount...
The Customer Service Center in a large New York department store has determined that the amount of time spent with a customer about a complaint is normally distributed, with a mean of 9.1 minutes and a standard deviation of 2.4 minutes. What is the probability that for a randomly chosen customer with a complaint, the amount of time spent resolving the complaint will be as follows. (Round your answers to four decimal places.) (A) less than 10 minutes (B) longer...
The Customer Service Center in a large New York department store has determined that the amount...
The Customer Service Center in a large New York department store has determined that the amount of time spent with a customer about a complaint is normally distributed with a mean of 9.3 minutes and a standard deviation of 2.5 minutes. 1) What is the probability that for a randomly chosen customer with a complaint the amount of time spent resolving the complaint will be less than 12 minutes? Write your answer to four decimal places. 2)  What is the probability...
the customer service center in a large New York department store has determined that the amount...
the customer service center in a large New York department store has determined that the amount of time spent with the customer about a complaint is normally distributed with the mean of 9.3 minutes and a standard deviation of 2.2 minutes what is the probability that 4 randomly chosen customer with the complaint the amount of time spent with solving the complaint will be as follows a less than 10 minutes be longer than 5 minutes see between 8 and...
The Customer Service Center in a large New York department store has determined that the amount...
The Customer Service Center in a large New York department store has determined that the amount of time spent with a customer about a complaint is normally distributed, with a mean of 9.1 minutes and a standard deviation of 2.2 minutes. What is the probability that for a randomly chosen customer with a complaint, the amount of time spent resolving the complaint will be as follows. (Round your answers to four decimal places.) (a) less than 10 minutes (b) longer...
The Customer Service Center in a large New York department store has determined that the amount...
The Customer Service Center in a large New York department store has determined that the amount of time spent with a customer about a complaint is normally distributed, with a mean of 8.3 minutes and a standard deviation of 2.7 minutes. What is the probability that for a randomly chosen customer with a complaint, the amount of time spent resolving the complaint will be as follows. (Round your answers to four decimal places.) (a) less than 10 minutes (b) longer...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT