I’m hoping you can help me with this python code. I almost have it correct, but i keep getting an error at the end. below is the problem along with my current code. Please see if you can adjust it to make it cooperate. Thank you!!!6.6 Warm up: Parsing strings (Python 3)
(4) Using a loop, extend the program to handle multiple lines of input. Continue until the user enters q to quit. (2 pts)
Need assignment help for this question?
If you need assistance with writing your essay, we are ready to help you!
Why Choose Us: Cost-efficiency, Plagiarism free, Money Back Guarantee, On-time Delivery, Total Сonfidentiality, 24/7 Support, 100% originality
Enter input string: Jill, Allen First word: Jill Second word: Allen Enter input string: Golden , Monkey First word: Golden Second word: Monkey Enter input string: Washington,DC First word: Washington Second word: DC Enter input string: q
name=input(‘Enter input string: ‘)
if(name != ‘q’):
name=name.replace(‘ ‘, ”)
if ‘,’ in name:
print(‘First word: ‘.strip(),name)
print(‘Second word: ‘.strip(),name)
‘,’ not in name
print(‘Error: No comma in string.’)