How do I turn this code into a flowchart? Python code: #defining the tuples tup1 = ("$") tup2 = ("$") tup3 = ("PAYROLL TRANSACTIONS") #creating the first function to creat the heading "PAYROLL TRANSACTIONS" def print_heading(): print("\t","\t", tup1, tup3, tup2, "\t","\t") print("\n") return #calling the function that was just made print_heading() #creating the second function to make a line between the heading and the data, making the chart look cleaner (this function will be called later) def break_line(): print("_____________________________________________________") print("\n") return #opening the employees file and calling it "Filea" Filea = open('Employees.csv') #reading the lines and copying them to a new variable, emp index 0 a = Filea.readlines() aHeading = a[0] #delete first line from line list we just made del a[0] #split is dividing this string into a list, making our columns and rows aHeading = aHeading.split(",") #opening the timesheet file and doing the same thing we just did above for this file timeFile = open('Timesheets.csv') time = timeFile.readlines() timeHeading = time[0] del time[0] timeHeading = timeHeading.split(",") #making am employee info list aInfo= [] #for loop for row in range(len(a)): #removing new line from the end of each row data = a[row] #spliting all of the data into a list data = data.split(",") timeData = time[row] timeData = timeData.split(",") #appending/putting together the data . timedata has the hours and data has the other info thechart = [] thechart.append(data[0]) thechart.append(data[1]) thechart.append(data[2]) thechart.append(timeData[1]) thechart.append(data[4]) #calculating the gross pay using the data we just put together in the last group of code if(data[5] == 'Y'): gpay = (40*float(data[4]))+((float(timeData[1]) - 40)*float(data[4])*1.5) else: gpay = float(timeData[1]) * float(data[4]) thechart.append(gpay) #adding employee data into the chart! aInfo.append(thechart) #printing the format print("Emp No","First","\t"," Last","\t", " Hours","Wage","Gross Pay") #calling break line function from beginning break_line() #print all employee information for e in aInfo: print("{:

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 9PP
icon
Related questions
Question
How do I turn this code into a flowchart? Python code: #defining the tuples tup1 = ("$") tup2 = ("$") tup3 = ("PAYROLL TRANSACTIONS") #creating the first function to creat the heading "PAYROLL TRANSACTIONS" def print_heading(): print("\t","\t", tup1, tup3, tup2, "\t","\t") print("\n") return #calling the function that was just made print_heading() #creating the second function to make a line between the heading and the data, making the chart look cleaner (this function will be called later) def break_line(): print("_____________________________________________________") print("\n") return #opening the employees file and calling it "Filea" Filea = open('Employees.csv') #reading the lines and copying them to a new variable, emp index 0 a = Filea.readlines() aHeading = a[0] #delete first line from line list we just made del a[0] #split is dividing this string into a list, making our columns and rows aHeading = aHeading.split(",") #opening the timesheet file and doing the same thing we just did above for this file timeFile = open('Timesheets.csv') time = timeFile.readlines() timeHeading = time[0] del time[0] timeHeading = timeHeading.split(",") #making am employee info list aInfo= [] #for loop for row in range(len(a)): #removing new line from the end of each row data = a[row] #spliting all of the data into a list data = data.split(",") timeData = time[row] timeData = timeData.split(",") #appending/putting together the data . timedata has the hours and data has the other info thechart = [] thechart.append(data[0]) thechart.append(data[1]) thechart.append(data[2]) thechart.append(timeData[1]) thechart.append(data[4]) #calculating the gross pay using the data we just put together in the last group of code if(data[5] == 'Y'): gpay = (40*float(data[4]))+((float(timeData[1]) - 40)*float(data[4])*1.5) else: gpay = float(timeData[1]) * float(data[4]) thechart.append(gpay) #adding employee data into the chart! aInfo.append(thechart) #printing the format print("Emp No","First","\t"," Last","\t", " Hours","Wage","Gross Pay") #calling break line function from beginning break_line() #print all employee information for e in aInfo: print("{:
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning