Write a program that reads text from the user and reverses the order of every number that appears in the text. For example: Hello! The number is 17 will become Hello! The number is 71 To help with...


This code is for Python


Write a program that reads text from the user and reverses the order of every number that appears in the text.<br>For example:<br>Hello! The number is 17<br>will become<br>Hello! The number is 71<br>To help with this problem, first write a function rev(text) that takes a string of text and returns the reverse.<br>For example, rev('Oranges

Extracted text: Write a program that reads text from the user and reverses the order of every number that appears in the text. For example: Hello! The number is 17 will become Hello! The number is 71 To help with this problem, first write a function rev(text) that takes a string of text and returns the reverse. For example, rev('Oranges") would return "segnarO. You may create any addition function you need. You must create the rev function. Your program will ask for a string of text and reverse and number. A number is defined as any sequence of digits 0-9. Remember to use if namemain: so that ZyBooks can test your rev function. Here are two examples. Welcome to Digit Flipper Enter Some Text: Hello! The number is 17. Revised String: Hello! The number is 71 The input may not have any spaces at all to break up the text. Welcome to Digit Flipper Enter Some Text: a123bb456bbsdfjhskdjh987sss1928 Revised String: a321bb654bbsdfjhskdjh789sss8291

Jun 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here