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

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter6: Sub And Function Procedures
Section: Chapter Questions
Problem 1MQ3
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning