Please written by computer source Instructions Deliverables: For this assignment you will submit two python files to the drop box. Name the main file: lastname_firstname_assign2.py and name the module file: conversion.py. Example: turner_randy_assign2.py Create a program that converts feet to meters and vice versa. Specifications The formula for converting feet to meters is: feet = meters / 0.3048 The formula for converting meters to feet is: meters = feet * 0.3048 Store the code that performs the actual conversions in separate functions within a separate code module named "conversions.py". These two functions will take a single parameter and return the resulting conversion value. Close the file Start a new .py file and use an "import" statement to import your custom module into this new file Write a separate function to display the program banner/title Write a separate function to display the menu as shown below in the sample output Write the rest of the code to (1) take the user input (2) call the proper functions (3) display output all in a main() function.   Note: The code inside the main() function should continue inside a While loop until the user is ready to quit. Coding steps: Display the title by calling the correct function Display the menu by calling the correct function Begin a loop and first ask the user for a conversion choice - save the input to a variable Use an "if/elif/else" to determine which choice was made. If something was entered other than "a" or "b" alert the user. If the choice is "a" or "b" then ask for the number of feet or meters. Make sure to convert this input to float() and save the result to a variable Call the correct function from the "conversion.py" module, passing in the user input, to do the conversion calculation. Print the results using the round() function Prompt the user to continue or not. Exit the loop on "n" and print "Bye!" NOTE: You can assume the user will enter valid data (no validation code required). Also, the program should round results to a maximum of two decimal places. Sample input/output: Feet and Meters Converter Conversions Menu: a. Feet to Meters b. Meters to Feet Select a conversion (a/b): a Enter feet: 100 The answer is 30.48 meters Would you like to perform another conversion? (y/n): y Conversions Menu: a. Feet to Meters b. Meters to Feet Select a conversion (a/b): b Enter meters: 100 The answer is 328.08 feet Would you like to perform another conversion? (y/n): n Thanks, bye

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please written by computer source

Instructions

Deliverables:

For this assignment you will submit two python files to the drop box. Name the main file: lastname_firstname_assign2.py and name the module file: conversion.py.

Example: turner_randy_assign2.py

Create a program that converts feet to meters and vice versa.

Specifications

The formula for converting feet to meters is: feet = meters / 0.3048

The formula for converting meters to feet is: meters = feet * 0.3048

Store the code that performs the actual conversions in separate functions within a separate code module named "conversions.py". These two functions will take a single parameter and return the resulting conversion value. Close the file

Start a new .py file and use an "import" statement to import your custom module into this new file

Write a separate function to display the program banner/title

Write a separate function to display the menu as shown below in the sample output

Write the rest of the code to (1) take the user input (2) call the proper functions (3) display output all in a main() function.  
Note: The code inside the main() function should continue inside a While loop until the user is ready to quit.

Coding steps:

Display the title by calling the correct function

Display the menu by calling the correct function

Begin a loop and first ask the user for a conversion choice - save the input to a variable

Use an "if/elif/else" to determine which choice was made. If something was entered other than "a" or "b" alert the user.

If the choice is "a" or "b" then ask for the number of feet or meters. Make sure to convert this input to float() and save the result to a variable

Call the correct function from the "conversion.py" module, passing in the user input, to do the conversion calculation.

Print the results using the round() function

Prompt the user to continue or not. Exit the loop on "n" and print "Bye!"

NOTE: You can assume the user will enter valid data (no validation code required). Also, the program should round results to a maximum of two decimal places.

Sample input/output:

Feet and Meters Converter Conversions Menu: a. Feet to Meters b. Meters to Feet Select a conversion (a/b): a Enter feet: 100 The answer is 30.48 meters Would you like to perform another conversion? (y/n): y Conversions Menu: a. Feet to Meters b. Meters to Feet Select a conversion (a/b): b Enter meters: 100 The answer is 328.08 feet Would you like to perform another conversion? (y/n): n Thanks, bye

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education