Home » python

python

or HW 3, you should use a main() function to control the program you write. You should also use other functions as appropriate (or as specified). 

String Manipulation – Write a program that asks the user to enter a word or phrase and then displays the word or phrase with all occurrences of the letter “r” removed. Example: “Park the car in Harvard Yard” becomes “Pak the ca in Havad Yad.”
Special Number – Write a program that can find a four-digit number that has the four digits reversed when multiplied by four. For example, rstu * 4 = utsr. The program should report the number to the user. 
Check for Palindromes – Write a program that prompts the user to enter a word or phrase. Then check to see if the word is a palindrome. A palindrome reads the same forward and backward ignoring punctuation and spaces. For example, “racecar,” “Madam, I’m Adam,” and “Anna.” You can use these palindrome sentences (Links to an external site.) as a source for checking if your program works. 
Calculate the Factorial – The factorial of a positive integer is the product 1 * 2 * 3 * 4 … * n where n represents the positive integer. Write a program that asks the user to enter a positive integer and calculates the factorial. Use a main() function to control the program flow. Write a function to get an integer from the user and verify the user entered a positive integer value. Write a different function to calculate the factorial for a number. 
[REMOVED FROM PY HW 3 BECAUSE WE DID NOT COVER FILE I/O IN CLASS YET] Crayon Colors – The file “Colors.txt Download Colors.txt” contains the names of 123 crayon colors with one color per line. Write a program that asks the user to enter a letter of the alphabet and then displays all the colors that start with that letter. Write three separate functions: one to get the user input, one to read the colors.txt file into a list, one to build a list with the colors that start with the letter, and one to display the output. 
Anagram Checker – Write a program that asks the user to enter two words or phrases. Then check to see if the words or phrases are anagrams of each other. Two words or phrases are anagrams of each other if they use the same letter with the same frequency in both phrases. Examples include night & thing, inch & chin, elbow & below, little big man & labeling mitt, another day & a hearty nod. 
[REMOVED FROM PY HW 3 BECAUSE WE DID NOT COVER FILE I/O IN CLASS YET]Sorting States List – The data file “States.txt Download States.txt” contains the 50 US states in order they joined the union with one state per line. Write a program to read the file contents into a list. Then sort the list based on the number of consonants contained in the state name in ascending order. HINT: You will need to write a function to count the number of consonants in a word. 
Reading Numbers – Write a program that asks the user to enter a number with 27 digits or less. The convert that number into a set of three-digit numbers and associated place values. Display the results to the user. The following table shows the output if the user entered 293452000450041006950254586. 

Don't use plagiarized sources. Get Your Custom Essay on
python
Just from $13/Page
Order Essay
Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
Live Chat+1(978) 822-0999EmailWhatsApp

Order your essay today and save 20% with the discount code BEGOOD