Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi i need help with this. (Instead of directly printing the information of a highway number, the interactive version - keeps asking the user for

Hi i need help with this.
image text in transcribed
image text in transcribed
(Instead of directly printing the information of a highway number, the interactive version - keeps asking the user for a highway number until the number they enter is valid, - then asks the user if they want to know the type or the direction of the valid highway number, and - finally prints the corresponding information. For more details on how the program works, check out the lecture from Monday 02/27. For this homework, you need to organize the code by defining two functions: 1. The first function is called get_highway_number and its job is to get a valid highway number from the user. 2. The second function is called print_highway_info and its job is to print the type or the direction. The two functions should be called from a main function, and there should be nothing else in the main function. Eventually, the structure of the code should look like this: def get_highina_numero: \# Type your code here and delete the next line pass def print highway_info (n) : i. Type your code here and delete the next line pass if _name ... "moin_." n= get_highway number() print_highway,info(n) Download the template here: interstatehighway interactive function.py, and fill in the definition of the two functions. Note: Your program should behave exactly the same as the original non-function version. nteractive_function.py def get_highway_number(): \# Type your code here and delete the next line pass def print_highway_info (n) : \# Type your code here and delete the next line pass if _name ==" main ". n= get highway number() print_highway_info (n)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

1.who the father of Ayurveda? 2. Who the father of taxonomy?

Answered: 1 week ago

Question

Commen Name with scientific name Tiger - Wolf- Lion- Cat- Dog-

Answered: 1 week ago

Question

Select suitable tools to analyze service problems.

Answered: 1 week ago