or HW 3, you should use a main() function to

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). 

  1. 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.”
  2. 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. 
  3. 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. 
  4. 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. 
  5. [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. 
  6. 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. 
  7. [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. 
  8. 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. 

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Instructions When you are engaging communities, it is important to

  Instructions When you are engaging communities, it is important to understand the nongeographical factors within the community (e.g., professional, spiritual, ethnic, racial, sexual orientation). For this assignment, build on last week’s work to explain how you will engage a specific community.  Assume you have been asked to describe your

BU Obesity and Pathophysiology Fact Sheet Nursing Assignment Help

Create a fact sheet that contains helpful photos and substantive information that contributes to an understanding of obesity and its Pathophysiology ,clinical manifestations and diagnostic tests from chapter 42: Assessment and Management of Patients with Obesity using the following book: Overbaugh, J.L.H.K.H.C. K. (2021). Lippincott CoursePoint Enhanced for Brunner &

Today’s health care environment gives nurses many reasons to be

  Today’s health care environment gives nurses many reasons to be conflicted. Genetic testing, abortion, and end of life care are just some of the areas in which nurses may face ethical dilemmas. Consider how you feel about the following issues: Respecting the wishes of a suffering client that he

A mental health disorder or a family or mental health disorder.

Choose a specifice mental health disorder or a family or mental health disorder. The assignment will require students to utlize academic search engines to obtain scholarly ,peer-reviewed articles. Example of such databases includes Proquest Psychology Journals, Eric,Lexis Nexis. Students must use a minimum of SIX CITED SOURCES. All work must

Socks are Hot We long for comfort and style in

Socks are Hot We long for comfort and style in our dress. Sometimes the stylish fashions are not comfortable, but when it comes to socks, we can have both style and comfort now. Why settle for boring old dark dress socks when you can instead wear vibrant, colorful socks that

Assessment Description Part of your role as an educator will

Assessment Description Part of your role as an educator will be to work alongside colleagues to assess resources and to determine whether these resources deepen educators’ understandings of cultural, ethnic, gender, and learning differences, build stronger relationships, and create more relevant learning experiences for students. Imagine that your principal has

1 – How could mixed methods research be used with

1 – How could mixed methods research be used with your research study? 2 – What is the advantage of using mixed methods research? What is a disadvantage? 3 – Do you believe mixed methods research is better than qualitative or quantitative research? Why or why not?4 – why is

Prepare and deliver a professional presentation based on the research

Prepare and deliver a professional presentation based on the research paper you have been working on all session. Your presentation must be a minimum of 10 PowerPoint slides, excluding the cover and reference slides (with presenter notes on each slide). Your supervisor was impressed with your research and has asked

It may seem to you that healthcare has been a

  It may seem to you that healthcare has been a national topic of debate among political leaders for as long as you can remember. Healthcare has been a policy item and a topic of debate not only in recent times but as far back as the administration of the

see attachment Lab 5: Galaxy Classification Name: Overview

see attachment Lab 5: Galaxy Classification Name: Overview In this activity, you will explore all possible morphological types of galaxies, how galaxy properties change as you move between morphologies, and how a galaxy’s color can describe galaxy properties and evolution. Objectives After completing this activity students will be able to:

In Module two, you were asked to describe an issue

  In Module two, you were asked to describe an issue ADVOCACY FOR NURSING SHORTAGE and you hoped to improve and you created a presentation about the plan. This week, you will present on the progress and results you have made during the past 5 weeks.  Your policy change proposal

How much is the Maytag Corporation approximately worth? If Haier

How much is the Maytag Corporation approximately worth? If Haier submitted a bid for Maytag, what would be a bid price?  ·from a financial perspective (price-earning or P/E ratio):  Ø market value = “multiple” x EPS x common shares outstanding Ø industry “multiples” ranges from 16-21 Ø projected earning-per-share: $.54

While understanding the basics of financial accounting is certainly important

While understanding the basics of financial accounting is certainly important for accountants, it is also an important skill to have in all types of professional fields. In this discussion, you will make connections between your chosen field and what you have learned about financial accounting in this course. Address the

EVIDENCE BASE IN DESIGN When politics and medical science intersect, there can be much debate. Sometimes anecdotes or hearsay are misused as evidence

EVIDENCE BASE IN DESIGN When politics and medical science intersect, there can be much debate. Sometimes anecdotes or hearsay are misused as evidence to support a particular point. Despite these and other challenges, however, evidence-based approaches are increasingly used to inform health policy decision-making regarding causes of disease, intervention strategies,

Read the following pages in Towards A New Architecture: (

Read the following pages in Towards A New Architecture: ( 267-289 )  and resp’ond to one (1) of the following prompts (A, B) in 100 – 150 words. WRI’TING PROMPTS:  Architecture III. Pure Creation of the Mind: A:  In this section, Le Corbusier describes a societal revolution in which the

For this week’s discussion, please respond to the following: Describe

For this week’s discussion, please respond to the following: Describe how your business operations will work. In other words, you want to explain the day-to-day flow of activities necessary to deliver your product or service to customers. Wherever applicable, identify costs. Be sure to address the following, if applicable to