Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there a way to go back and edit the information the user entered?
    primarykey
    data
    text
    <p>I have a simple code written in Python 2.7 that will ask users for certain information, and it exports the information to a .csv file. Once the user inputs the data, is there a way for them to go back and edit what they entered after pressing enter? Here is what i have so far:</p> <pre><code>def writer(): import csv with open('Work_Order_Log.csv', 'a') as f: w=csv. writer(f, quoting=csv.QUOTE_ALL) while (1): Correct=True Employee=True WorkOrder=True Item=True Qty=True Process=True Date=True Time=True while Correct: Correct=False Employee=False WorkOrder=False Item=False Qty=False Process=False Date=False Time=False Employee=raw_input("1. Enter Your Name:") WorkOrder=raw_input("2. Enter The Work Order Number:") PartNumber=raw_input("3. Enter The Item Number:") Qty=raw_input("4. Enter Quantity:") Process=raw_input("5. Enter Process:") Date=raw_input("6. Enter Date(mm/dd):") Time=raw_input("7. Total Time(hh:mm):") needToCorrect=raw_input("Is the last Entry Correct? (If so, type 'y') If not enter the Number of the Field that is incorrect:") if needToCorrect=="1": Employee=True elif needToCorrect=="2": WorkOrder=True elif needToCorrect=="3": Item=True elif needToCorrect=="4": Qty=True elif needToCorrect=="5": Process=True elif needToCorrect=="6": Date=True elif needToCorrect=="7": Time=True w.writerow([Employee,WorkOrder,Item,Process,Qty,Date,Time,Correct]) writer() </code></pre> <p>After testing the code, I have found that when I enter the number of the incorrect field for correction, it shows in the .csv file that it was incorrect, but still makes me go through the entire loop to fix the errors. Why is this?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload