Question: In Python code: I need to create a file answers.txt that stores many questions. These questions are of the form: What is the capital of
In Python code:
I need to create a file "answers.txt" that stores many questions. These questions are of the form: "What is the capital of Italy?", "How is the weather like today?", etc. We assume that each question is written on a separate line. Write a program that reads these questions one time and displays it to the user so that he answers it. Once the user has answered all the questions, overwrite the content of the file by saving the questions and their answer next to them in it.
The program content should become something like that:
What is the capital of Italy? Rome How is the weather like today? It's sunny
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
