Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python (Pyodide Write a program in which you ask user to enter a string in a loop. if user enters 'Exit' then you print

 

Python (Pyodide Write a program in which you ask user to enter a string in a loop. if user enters 'Exit' then you print an "Exiting, good by" message and finish the execution of program. If user enters a symmetrical string then your print the message "Its a Palindrome!" and then programe continues for next input. If user enters any other string you print the lenght of the string and the string in reverse order and then program continues to ask user for a new string. [Marks: 10] Please note the following: A string is symmetrical if string is equal to its reverse string (eg: ama, abba, ambma, etc (there are infintly many such strings)). . Your prorgam should exit when user enters word exit with any combination of Upper and Lower case letters (eg: Exit, exit exit, exIT etc are all valid exit commands) Exiting the program means terminating the execution. This can be implemented using break statement in the loop. B please do not use exit() function in jupyter becasue it kills the kernel. Rubric: Main loop that asks for any string: 2 marks Handling of all possilbe exit commands: 1 marks Checking of symmetrical string and printing message: 3 marks Printing of message with string lenght and string in reverse: 2 marks Testing: You have tested your program for atleast one set of values: 1 marks Comments: Add necessary comments to explain the process: 1 marks vate Windo Settings to ac

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Matlab An Introduction with Applications

Authors: Amos Gilat

5th edition

1118629868, 978-1118801802, 1118801806, 978-1118629864

More Books

Students also viewed these Programming questions

Question

How does an ERP system differ from MRP II software?

Answered: 1 week ago