For Loops: Exercise and Solution-7

Exercise

Exercise 2: Write a program that reads price of 5 products, calculates and displays the total price.

Code

See below the codet:
	total_price=0 
        for i in range(5): 
            price=float(input("Enter the price ")) 
            total_price=total_price+price 
        print("the total price is ",total_price)
	
For more details, please contact me here.