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
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 4 images
- The fields below repeat for each customer: o Customer name (String)o Customer ID (numeric integer) o Bill balance (numeric)o EmailAddress (String)o Tax liability (numeric or String) The customers served by the office supply store are of two types: tax-exempt or non-tax- exempt. For a tax-exempt customer, the tax liability field on the file is the reason for the tax exemptions: education, non-profit, government, other (String). For a non-tax exempt customer, the tax liability field is the percent of tax that the customer will pay (numeric) based on the state where the customer’s business resides. Program requirements: From the information provided, write a solution that includes the following: A suitable inheritance hierarchy which represents the customers serviced by the office supply company. It is up to you how to design the inheritance hierarchy. I suggest a Customer class and appropriate subclasses.. For all classes include the following: o Instance variables o…arrow_forwardUSING java: Create a simple Tic Tac Toe game designed for one player (against computer). you will need to create arrays and functions to complete this program. The first screen should ask the user for his name, print a welcome message, and display an empty 3x3 Tic Tac Toe board. Then, the program should ask the user to put the coordinates of his move. once the user enters the coordinates, the program should respond accordingly with a print of the user's move and the computer's move. this should go on until a winning pattern is found. Key steps: Game board is designed, user inputs taken and marked on the board, validate the inputs that no two inputs at the same place and out of range, check the winner/loser and complete the game.arrow_forwardplease write in javaarrow_forward
- What would be the missing line of codes?arrow_forwardUnderstanding ifStatements Summary In this lab, you complete a prewritten Java program for a carpenter who creates personalized house signs. The program is supposed to compute the price of any sign a customer orders, based on the following facts: The charge for all signs is a minimum of $35.00. The first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character. If the sign is made of oak, add $20.00. No charge is added for pine. Black or white characters are included in the minimum charge; there is an additional $15 charge for gold-leaf lettering. Instructions 1. Ensure the file named HouseSign.java is open. 2. You need to declare variables for the following, and initialize them where specified: A variable for the cost of the sign initialized to 0.00 (charge). A variable for the number of characters initialized to 8 (numChars). A variable for the color of the characters initialized to "gold" (color). A variable for the…arrow_forwardI'm running a 5-star restaurant and I can only have the best items on my menu. My menu offers 6 items, each represented by a number from 1-6. If an item on my menu does not sell or does not sell that much compared to others, I must act and replace it with something that sells! Identify which dishes do not sell. If every dish sells, print the set of dishes that were ordered least. Input: A single line containing the dish number that were ordered. Treat as one number. INPUT: 156356231 Output: The list of dishes not ordered in numerical order. If every dish sells, print the set of dishes that were ordered least. Separate each number with a new line. OUTPUT: 4arrow_forward
- Please assist with the attached question using Java language. Thanks.arrow_forwardIn Java: Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outputs yes if every character is a digit 0-9. Ex: If the input is: 1995 the output is: yes Ex: If the input is: 42,000 or 1995! the output is: no Hint: Use a loop and the Character.isDigit() function.arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY