Solved Homework: Question: Any and all help will be greatly appreciated. I have no clue how to even begin with this code. Pl…

6.10 Ch 6 Program: Authoring assistant (Python 3) (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: we1l continue our quest in space. there will be more shuttle flights and more shuttle crews and, yesi more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue! You entered: we1l continue our quest in space. there will be more shuttle flights and more shuttle crews and, yesi 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 users 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 menu0 in the main section of your code. Continue to call printmenu until the user enters q to Quit. (3 pts)

Any and all help will be greatly appreciated. I have no clue how to even begin with this code. Please help, thank you.

6.10 Ch 6 Program: Authoring assistant (Python 3) (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’1l continue our quest in space. there will be more shuttle flights and more shuttle crews and, yesi more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue! You entered: we’1l continue our quest in space. there will be more shuttle flights and more shuttle crews and, yesi 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 menu0 in the main section of your code. Continue to call printmenu until the user enters q to Quit. (3 pts)

Expert Answer

answers

CODE

==============

# Part 1

sentence = input(“Enter a sample text : “)

# Part 3

def get_num_of_non_WS_characters(string):

count = 0

for i in range(len(string)):

if string[i] != ” “:

count += 1

return count

# Part 4

def get_num_of_word(string):

return len(string.split(” “))

# Part 2

def print_menu(string):

option = “”

while True:

print(“MENU”)

print(“c – Number of non-whitespace characters”)

print(“w – Number of words”)

print(“f – Fix Capitalization”)

print(“r – Replace Punctuation”)

print(“s – Shorten spaces”)

print(“q – Quit”)

option = input(“nChoose an option: “)

if option == “c”:

print(“Number of non-whitespace characters: ” + str(get_num_of_non_WS_characters(string)))

break

elif option == “w”:

print(“Number of words: ” + str(get_num_of_word(string)))

break

elif option == “f”:

#call fix_capitalization()

break

elif option == “r”:

#call replace_punctuation()

break

elif option == “s”:

#call shorten_space()

break

elif option == “q”:

#quit

break

else:

print(“Invalid input….please try again!!”)

break

return (option, string)

while True:

option, sentence = print_menu(sentence)

if option == “q”:

break

# Part 1 2 sentenceinput(Enter a sample text: ) 4 # Part 3 5 def get_num_of_non_WS_characters (string): count 0 for i in range( len (string)): if string[i]: count += 1 10 return count 12 13 # Part 4 14 def get_num_of word(string): 15 16 17 # Part 2 18 def print_menu(string): 19 20 21 return len(string.split( )) option while True: print (MENU) print(c - Number of non-whitespace characters) print(w - Number of words) print(f - Fix Capitalization) print(r - Replace Punctuation) print(s - Shorten spaces) print(q - Quit 23 24 25 26 27 28 29 30 31 32 option input (nChoose if optionc: an option: ) print(Number of non-whitespace characters: str(get_num_of_non_WS_characters(string))) break

 

Buy Essay
Calculate your paper price
Pages (550 words)
Approximate price: -

Help Me Write My Essay - Reasons:

Best Online Essay Writing Service

We strive to give our customers the best online essay writing experience. We Make sure essays are submitted on time and all the instructions are followed.

Our Writers are Experienced and Professional

Our essay writing service is founded on professional writers who are on stand by to help you any time.

Free Revision Fo all Essays

Sometimes you may require our writers to add on a point to make your essay as customised as possible, we will give you unlimited times to do this. And we will do it for free.

Timely Essay(s)

We understand the frustrations that comes with late essays and our writers are extra careful to not violate this term. Our support team is always engauging our writers to help you have your essay ahead of time.

Customised Essays &100% Confidential

Our Online writing Service has zero torelance for plagiarised papers. We have plagiarism checking tool that generate plagiarism reports just to make sure you are satisfied.

24/7 Customer Support

Our agents are ready to help you around the clock. Please feel free to reach out and enquire about anything.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

HOW OUR ONLINE ESSAY WRITING SERVICE WORKS

Let us write that nagging essay.

STEP 1

Submit Your Essay/Homework Instructions

By clicking on the "PLACE ORDER" button, tell us your requires. Be precise for an accurate customised essay. You may also upload any reading materials where applicable.

STEP 2

Pick A & Writer

Our ordering form will provide you with a list of writers and their feedbacks. At step 2, its time select a writer. Our online agents are on stand by to help you just in case.

STEP 3

Editing (OUR PART)

At this stage, our editor will go through your essay and make sure your writer did meet all the instructions.

STEP 4

Receive your Paper

After Editing, your paper will be sent to you via email.

× How can I help you?