Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Code Please.. Wrte program with functions and Arrays to Implement the following. Miles Driven Application using Arrays and Functions. Not using functions wil cost

Python Code Please..

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Wrte program with functions and Arrays to Implement the following. Miles Driven Application using Arrays and Functions. Not using functions wil cost you 25% of the grade. Create two arrays rk3 1. Monthname This array contains month names such as January, "February, etc 2 MilesDriven This array contains the miles driven for the month. It should be of size Write a program to display the menu with the following options and ask for the user input Type P to populate miles and month name. Type S to search for Month. Type M to search for Month name with smallest Miles Type L to search for Month Name with Largest Miles Type E to exit . It the user types P Populate all the arrays. Collect 12 month names and miles driven for each month. If the user types S then . . Ask the user for the Month Name. - Search the array for that Month Name and find its position in the Monthname array Display the MonthName, and MilesDriven at the position found during the above search. if the user types M then e Search the array for the smallest miles in MilesDriven array and find its position. Display the MonthName, and MilesDriven at the position found during the above search. . If the user types L then . Search the array for the largest Miles in MilesDriven array and find its position : Display the MonthName, and MilesDriven at the position found during the above search. . If the user types E. then: Terminate the program after displaying the message shown in the test case scenario below If the user types any other option Display the message "Invalicd Choice. Try again" and go back and display the menu PS: You program must keep displaying the menu until the user types the option E, to exit the program. For exact input and output messages, please refer to the test case scenario

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions