subject

This problem has been solved! see the answer8.30 lab*: program: authoring assistant(1) prompt the user to enter a string of their choosing. store the text in a string. output the string. (1 pt)ex: enter a sample text: we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes; more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue! you entered: we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes; more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue! (2) implement a print_menu() function, which has a string as a parameter, outputs a menu of user options for analyzing/editing the string, and returns the user's entered menu option and the sample text string (which can be edited inside the print_menu() function). each option is represented by a single character. if an invalid character is entered, continue to prompt for a valid choice. hint: implement the quit menu option before implementing other options. call print_menu() in the main section of your code. continue to call print_menu() until the user enters q to quit. (3 pts)ex: menuc - number of non-whitespace charactersw - number of wordsf - fix capitalizationr - replace punctuations - shorten spacesq - quitchoose an option: (3) implement the get_num_of_non_ws_characters() function. get_num_of_non_ws_characters() has a string parameter and returns the number of characters in the string, excluding all whitespace. call get_num_of_non_ws_characters() in the print_menu() function. (4 pts)ex: number of non-whitespace characters: 181(4) implement the get_num_of_words() function. get_num_of_words() has a string parameter and returns the number of words in the string. hint: words end when a space is reached except for the last word in a sentence. call get_num_of_words() in the print_menu() function. (3 pts)ex: number of words: 35(5) implement the fix_capilization() function. fix_capilization() has a string parameter and returns an updated string, where lowercase letters at the beginning of sentences are replaced with uppercase letters. fix_capilization() also returns the number of letters that have been capitalized. call fix_capilization() in the print_menu() function, and then output the number of letters capitalized and the edited string. hint 1: look up and use python functions .islower() and .upper() to complete this task. hint 2: create an empty string and use string concatenation to make edits to the string. (3 pts)ex: number of letters capitalized: 3edited text: we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes; more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue! (6) implement the replace_punctuation() function. replace_punctuation() has a string parameter and two keyword argument parameters exclamation_count and semicolon_count. replace_punctuation() updates the string by replacing each exclamation point character with a period and each semicolon (; ) character with a comma replace_punctuation() also counts the number of times each character is replaced and outputs those counts. lastly, replace_punctuation() returns the updated string. call replace_exclamation() in the print_menu() function, and then output the edited string. (3 pts)ex: punctuation replacedexclamation\_count: 1semicolon\_count: 2edited text: we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. nothing ends here, our hopes and our journeys continue.(7) implement the shorten_space() function. shorten_space() has a string parameter and updates the string by replacing all sequences of 2 or more spaces with a single space. shorten_space() returns the string. call shorten_space() in the print_menu() function, and then output the edited string. hint: look up and use python function . (3 pt)ex: edited text: we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue! labactivity8.30.1: lab*: program: authoring assistant

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:30, eiza666
My mom and i are moving and we don’t have wifi for the next week, i want to know if using a using a hotspot with unlimited data is better than using regular wifi. i’m considering cost, speed, and data sacrifices.
Answers: 1
image
Computers and Technology, 22.06.2019 12:10, Geo777
1. package newton’s method for approximating square roots (case study 3.6) in a function named newton. this function expects the input number as an argument and returns the estimate of its square root. the script should also include a main function that allows the user to compute square roots of inputs until she presses the enter/return key. 2. convert newton’s method for approximating square roots in project 1 to a recursive function named newton. (hint: the estimate of the square root should be passed as a second argument to the function.) 3. elena complains that the recursive newton function in project 2 includes an extra argument for the estimate. the function’s users should not have to provide this value, which is always the same, when they call this function. modify the definition of the function so that it uses a keyword parameter with the appropriate default value for this argument, and call the function without a second argument to demonstrate that it solves this problem. 4. restructure newton’s method (case study 3.6) by decomposing it into three cooperating functions. the newton function can use either the recursive strategy of project 1 or the iterative strategy of case study 3.6. the task of testing for the limit is assigned to a function named limitreached, whereas the task of computing a new approximation is assigned to a function named improveestimate. each function expects the relevant arguments and returns an appropriate value. 5. a list is sorted in ascending order if it is empty or each item except the last one is less than or equal to its successor. define a predicate issorted that expects a list as an argument and returns true if the list is sorted, or returns false otherwise. (hint: for a list of length 2 or greater, loop through the list and compare pairs of items, from left to right, and return false if the first item in a pair is greater.)
Answers: 1
image
Computers and Technology, 22.06.2019 17:30, Samsonb
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year. ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
image
Computers and Technology, 22.06.2019 21:30, Nathaliasmiles
The graph shows median weekly earnings for full-time workers according to education level. which can you not conclude?
Answers: 2
You know the right answer?
This problem has been solved! see the answer8.30 lab*: program: authoring assistant(1) prompt the...

Questions in other subjects:

Konu
Mathematics, 14.06.2021 18:30
Questions on the website: 13722359