Write a Python program, phone.py, that inputs a string of characters which represent a vanity telephone...

60.1K

Verified Solution

Question

Programming

Write a Python program, phone.py, that inputs a string ofcharacters which represent a vanity telephone number, e.g.,800-MYPYTHON, and prints the all numeric equivalent,800-69798466.

You should implement this using a loop construct to processeach character from left to right. Build a new string that is theall numeric equivalent and then print the string.

Answer & Explanation Solved by verified expert
4.1 Ratings (737 Votes)
I have attached the screenshot for both    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students