Question: Example: Program 6-11 save_running_times.py & 6-12 read_running_times.py & 7-12 drop_lowest_score.py Start Function write_cars() First, declare global variable called filename. Get the number of Second, assign

Example: Program 6-11 save_running_times.py & 6-12 read_running_times.py & 7-12 drop_lowest_score.py Start Function write_cars() First, declare global variable called filename. Get the number of Second, assign cars on the lot. filename = the output Put value in whole text file cars number data type variable called cars_qty main() Calls function Open an empty file by main referencing filename for inputting new data. Assign this opening to cars_file. Print ("Program finished.") Use for loop having counter End called item_num in range of cars_qty Completed cars Not completed reading cars_file function main input("Car#' concatenated with item num + 1 concatenated with " Enter car cost: ") Call concatenate '\ ' function write_cars() assign to string Data Type cost_value Write the string line cost_value to cars_file. Close the file Print ("The cost value of each car has been saved on a newline to file: ", filename) Return cars_qty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
