Write program that prompts the user to enter a phone number

Assignment Help Programming Languages
Reference no: EM131308420

Write a function that returns a number, given an uppercase letter, as follows:

def getNumber(uppercaseLetter):

Write a test program that prompts the user to enter a phone number as a string. The input number may contain letters. The program translates a letter (upper- or lowercase) to a digit and leaves all other characters intact.

Here is a sample run of the program:

Enter a string: 1-800-Flowers

1-800-3569377

Enter a string: 1800 flowers

18003569377

Reference no: EM131308420

Questions Cloud

Design your own java class that includes three data fields : Design your own Java Class that includes at least 3 data fields, 2 constructors and 4 methods. When designing your class, pick an object that you are familiar with and make it your own, realistic, yet simple design with reasonable data fields and ..
Take for the bond to reach its stated face value : How much will a 31, 600 EE savings bond cost you when you initially purchase it; assume the bond earns 4.91 percent annually, approximately how long will it take for the bond to reach its stated face value?
Design a class named pet which should have the name fields : Design a class named Pet, which should have the following fields: •Name - The name field holds the name of a pet. •Type - The type field holds the type of animal that is the pet. Example values are "Dog", "Cat", and "Bird".
Internal rate of return exceeds the required return : Which one of the following statements is correct in relation to independent projects? The internal rate of return cannot be used to determine the acceptability of a project that has financing type cash flows. A project with investing type cash flows ..
Write program that prompts the user to enter a phone number : Write a test program that prompts the user to enter a phone number as a string. The input number may contain letters. The program translates a letter (upper- or lowercase) to a digit and leaves all other characters intact.
Does an snmp manager run a client snmp program : Does an SNMP manager run a client SNMP program or a server SNMP program?
Statements is correct in relation to independent projects : Which one of the following statements is correct in relation to independent projects?
How situation would be handled and what steps to begin with : Discuss how the situation would be handled and what steps to begin with. Examine how data would be retrieved and/or destroyed. Address what steps would be taken to determine the culprit.
Basic social obligation of a business organization : What are the basic social obligation of a business organization? Does this conflict wth the profit objectives of the business? What is social audit?

Reviews

Write a Review

Programming Languages Questions & Answers

  Program that will help user with metric conversions

Write a program that will help the user with metric conversions. Your program should allow the user to specify the names of the units as strings (e.g., centimeters, liters, grams, for the metric system and inches).

  Write the application using the one-dimensional array

Write the application using the one-dimensional array which inputs ten numbers from user, each number can be between and 100, inclusive.

  Design program which uses array of shape

Design a program which uses the array of Shape references to objects of each concrete class in hierarchy. The program must print text description of object to which each array element refers.

  Design logic for application for company to store breakdown

Design the logic for an application for a company that wants a report containing a breakdown of payroll by department. Input includes each employee's last name.

  Draw the syntax diagrams for each of the grammar elements

Show/Draw the syntax diagrams for each of the grammar elements above. Hyperlink reference not valid. Show the parse trees (which can be generated in ANTLRWorks) for each of the following sentences.

  Explain the purpose of the attributes

Imagine you are a part of a team that is tasked with writing a mobile app that will allow users to store information for all of their contacts (e.g., friends, family, etc.). Identify at least two (2) attributes of the object contact in this applic..

  Development of a simple menu driven text adventure

Explain why NO_EXIT has been declared and used in defining the contents of the map array, rather than just directly using the value 99999 in the map array definition

  Create a script that requires your visitors to accept

If the check box is not selected, display an alert dialog box information the user that he or she must accept the terms. if the user clicks the Decline link, open the Declinepage.html document.

  Convert the map in figure to a network

Convert the map in Figure 11-28 to a network and present it to management. Modify the graph ADT to store weights in the arc nodes.

  Create two files one first.html and the other first.js

Use comments and lay the code out so it can be easily followed.The lines will display all at once for this assignment.

  Program that prompts the user to input the dimensions

Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and water, in cylinderical containers. The shipping charges depend on the amount of liquid in the container.

  Function to recognize employee-s number and address

You are given with 45 telephone numbers of Employee who are misusing call center resources.Write down Fcomputer program function to recognize Employee no.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd