Stuck, here's what I have thus far. def calculate_meters(meters): meters = int(input('Enter Feet: ')) meters = (meters * 0.3048) meters = round(meters,2) return meters def calculate_feet(feet): feet = int(input('Enter meters: ')) feet = (feet / 0.3048) feet = round(feet,2) return feet print('Feet and Meters Converter') def mainmenu(): while True: print('Feet and Meters Converter') print() print('Conversions Menu:') print('a. Feet to Meters') print('b. Meters to Feet') choice = str(input('Select a conversion (a/b):')) print() if choice == 'a': calculate_meters() choice2 = str(input('Would you like to perform another conversion? (y/n): ')) while choice2 == 'y': pass if choice == 'b': calculate_feet() choice2 = str(input('Would you like to perform another conversion? (y/n): ')) while choice2 == 'n': print('Thanks, bye!') break
Stuck, here's what I have thus far.
def calculate_meters(meters):
meters = int(input('Enter Feet: '))
meters = (meters * 0.3048)
meters = round(meters,2)
return meters
def calculate_feet(feet):
feet = int(input('Enter meters: '))
feet = (feet / 0.3048)
feet = round(feet,2)
return feet
print('Feet and Meters Converter')
def mainmenu():
while True:
print('Feet and Meters Converter')
print()
print('Conversions Menu:')
print('a. Feet to Meters')
print('b. Meters to Feet')
choice = str(input('Select a conversion (a/b):'))
print()
if choice == 'a':
calculate_meters()
choice2 = str(input('Would you like to perform another conversion? (y/n): '))
while choice2 == 'y':
pass
if choice == 'b':
calculate_feet()
choice2 = str(input('Would you like to perform another conversion? (y/n): '))
while choice2 == 'n':
print('Thanks, bye!')
break
![**Feet and Meters Converter Program**
### Console Output
```
Feet and Meters Converter
Conversions Menu:
a. Feet to Meters
b. Meters to Feet
Select a conversion (a/b): a
Enter feet: 100
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
328.08 feet
Would you like to perform another conversion? (y/n): n
Thanks, bye!
```
### Program Specifications
- **Conversion Formulas:**
- To convert feet to meters:
\[
\text{meters} = \text{feet} \times 0.3048
\]
- To convert meters to feet:
\[
\text{feet} = \text{meters} \div 0.3048
\]
- **Code Structure:**
- Create functions for each conversion:
- Function to convert Feet to Meters.
- Function to convert Meters to Feet.
- Ensure each function accepts parameters and returns a value.
- Create a function to display the conversion menu.
- Main function to handle input and output, directing to the appropriate conversion functions based on user input.
- **User Input:**
- Ensure the user inputs valid data for the conversions.
- **Output:**
- Results should be rounded to a maximum of two decimal places.
### Grading Criteria
- **Functions:**
- Create 3 main functions: one for converting feet to meters, one for converting meters to feet, and a menu function.
- All functions must execute correctly.
- Missing functions will result in a deduction of 10 points each.
- **Calculations:**
- Incorrect calculations will result in a deduction of 10 points per error.
- **Input Handling:**
- Incorrect handling or missing input handling in the main function will result in a deduction of 10 points.
- **Formatting and Errors:**
- Proper formatting is required where blank lines and prompts should be appropriately placed.
- Other errors, such as incorrect prompts or output not in main functions, will each result in a deduction of 10 points.
This program aims to help students understand and implement basic conversion calculations through a structured and](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1df11701-b818-4e01-b30d-f9e565040856%2Fffda0153-d7ff-40c3-be19-5d25a8623afc%2Flltftxl_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)