Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Start with this program in a new program file: from read_lines import read_lines lines = read_lines() print(lines) ci = theta contin = True while contin:
Start with this program in a new program file: from read_lines import read_lines lines = read_lines() print(lines) ci = theta contin = True while contin: if ???: contin - False else: line = ??? ??? print(ci. line) It's your job to fill in the question marks with statements that make the program work. If these lines are the input: abc def ghi Then after the last line and the empty line are entered, then the program needs to display this output: [' abc', ' de f', ' ghi] (leftarrow this is from the first print statement) 1 abc (leftarrow now the loop starts) 2 def 3 ghi In other words, each line of input is numbered from 1 and displayed. Use the variable ci as the number to display
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started