3. For this problem, you should describe the algorithm using a flowchart and then write Python code to implement the algorithm. You will write the Python code in a Python program file and then run it to obtain the output. Include in your HW document a photo of your flowchart and a screenshot of your code and the output in IDLE you get when you run the program. Algorithm: Ask the user to enter the user’s first name, the number of children the user has, and the average number of children per family in the user’s state. Define a variable to hold the difference between the user’s number of children and the average number of children per family. Print out the values of name, a number of children, the average number of children, and the difference formatted to 2 decimal places. I need the flowchart and the code for this question I need both.....
FlowChart
SOURCE CODE:
*Please follow the comments to better understand the code.
**Please look at the Screenshot below and use this code to copy-paste.
***The code in the below screenshot is neatly indented for better understanding.
# Ask for the data here
first_name = input('Enter Your FirstName: ')
num_of_children = int(input('Enter Number of children you have:
'))
avg_children = float(input('Enter Average children your state has:
'))
# Calculate the difference
diff = num_of_children - avg_children
# print the output
print('First Name: ',first_name)
print('Number Of Children: ', num_of_children)
print('Average Children:{0:.2f} '.format(avg_children))
print('Difference: {0:.2f}'.format(diff))
============
Get Answers For Free
Most questions answered within 1 hours.