In: Computer Science
1. Create a flow chart from the algorithm then create python code.
Algorithm: Tell the user to enter their name, how many cars the user has, and the average number of cars per family in the users state. Create a variable to show the difference between the users number of cars and the average number of cars per family. Print the values of name, number of cars, average number of cars, and the difference in 2 decimal places.
code
n=input("enter name")
a=float(input("no.of cars"))
b=float(input("avg no.of cars"))
d=a-b
print("name of a user",n)
print("no.of cars",a)
print("avg no.of cars",b)
print("difference","%.2f"% d)
flowchart