Write a program that asks the user for a letter

Assignment Help Python Programming
Reference no: EM131474050

Python Assignment incorporating Functions & loops

Write a program that asks the user for a letter. The program should then determine if the letter is a vowel or not.

In this homework you will, of course, be writing functions to perform the individual components of the program. Make sure that you follow these requirements EXACTLY.

For this assignment, you should have the following functions:

1. First function: AskForLetter(): This function will repeatly as the user for a single letter until the user types ‘quit' to exit the program or they have entered a vowel. This function will use the built-in python function called len. len is used to determine the length of an input. For example, if the input from the user is ‘i', len(‘i') will return 1. Try this in python interpreter. If the len of the user input is 1, then this function should call the second function below.

2. Second function: IsVowel(letter): This function will take as input a variable called letter and will determine if this letter is a vowel or not. If it is a vowel it will return True and is not it will return To determine if letter is vowel or not, this function will call a third and a fourth function below.

3. Third function: IsLowercaseVowel(letter): this function will take a single variable as input called letter and will return True if the letter is a lowercase vowel and will return False if not.

4. Fourth function: IsUppercaseVowel(letter): this function will take a single variable as input called letter and will return True if the letter is a uppercase vowel and will return False if not.

5. Fifth function: PrintIsVowel(): this function will print a sentence to the user (standard out) indicating if the input is a vowel or not. It will be called inside AskForLetter(letter). This function will take as input the original letter input by the user so that it can be included in the output sentence.

Make sure you account for user input error. Test your code by trying to cause errors in input.

If you can write the program solving the Assignment instructions provided. Requirements for each function are to be followed exactly.

Reference no: EM131474050

Questions Cloud

Frequently asked questions about forecasting : It provides answers to frequently asked questions (FAQs) about forecasting. For example, one of the FAQs.
Find the probability that the randomly chosen marble : If a single marble is chosen at random, find the probability that the randomly chosen marble is: a. red P(red)=. b. white P(white), and c. blue OR redx P.
How can average nurses be involved in the political process : What does it mean to be a change agent? Give two examples of when you were a change agent or witnessed another nurse as a change agent.
Identify different types of marketing research company uses : Identify the different types of marketing research it uses and describe the importance of that research to the company using the provided template.
Write a program that asks the user for a letter : Write a program that asks the user for a letter. The program should then determine if the letter is a vowel or not
Explain the psychological addiction and physical addiction : Discuss the differences between psychological addiction and physical addiction as related to the use of tranquilizers, and explain Roy's addictions.
Test goodness-of-fit-homogeneity-independence : To see if your bag was unusual should you test goodness-of-fit, homogeneity, or independence?
Derive excitation tables for given circuit : For the following circuit, Complete the timing diagram starting with Y1Y2 = 00 (at time = 0). Derive excitation tables.
Define what kind of an addiction this person has : Define what kind of an addiction this person has. Give a DSM diagnosis and your reasons for it. Explain one counseling approach.

Reviews

len1474050

4/25/2017 8:29:17 AM

In this homework you will, of course, be writing functions to perform the individual components of the program. Make sure that you follow these requirements EXACTLY. Make sure you account for user input error. Test your code by trying to cause errors in input. If you can write the program solving the Assignment instructions provided. Requirements for each function are to be followed exactly.

len1474050

4/25/2017 8:28:59 AM

Python Assignment incorporating Functions & loops Just had a lecture in Python covering the following topics: • if/elif/else • while/break/continue/else • operators • Functions If you can write the program solving the Assignment instructions provided. Requirements for each function are to be followed exactly.

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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