Question: def main ( ) : customer _ count = 0 customers = [ ] quantities = [ ] discount _ rates = [ ] final

def main():
customer_count =0
customers =[]
quantities =[]
discount_rates =[]
final_bills =[]
sentinel_value =-1
while True:
customer_name = input("Enter customer name (or {} to end): ".format(sentinel_value))
if customer_name == str(sentinel_value):
break
while True:
try:
quantity = int(input("Enter quantity ordered: "))
if quantity >0:
break
else:
print("Invalid quantity. Please enter a positive integer.")
except ValueError:
print("Invalid input. Please enter a positive integer.")
customers.append(customer_name)
quantities.append(quantity)
# Calculate discounts and final bills
for quantity in quantities:
discount_rate =0
if quantity >=10 and quantity 20:
discount_rate =0.05
elif quantity >=20 and quantity 30:
discount_rate =0.1
elif quantity >=30 and quantity 40:
discount_rate =0.15
elif quantity >=40 and quantity 50:
discount_rate =0.2
elif quantity >=50 and quantity 60:
discount_rate =0.25
else:
discount_rate =0.3
price_per_ball =2.99
cost = quantity * price_per_ball
final_bill = cost *(1- discount_rate)
discount_rates.append(discount_rate)
final_bills.append(final_bill)
# Output results
print("
Customer Information and Bills:")
for i in range(customer_count):
print(f"Name: {customers[i]}")
print(f"Quantity Ordered: {quantities[i]}")
print(f"Discount Rate: {discount_rates[i]*100:.2f}%")
print(f"Final Bill: ${final_bills[i]:.2f}")
if __name__=="__main__":
main()
PLEASE CONVERT THIS PYTHON TO A FLOWCHART USING RAPTOR AVALONIA.
Please upload screenshots of the flowchart made using Raptor Avalonia.
An example of the flowchart in Raptor is attached. PLEASE provide the answer by uploading pictures of completed flowchart using RAPTOR.
def main ( ) : customer _ count = 0 customers = [

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 Programming Questions!