Question:
Define a class called Lunch. Its __init__() method should have two arguments: self and menu. Where menu is a string. Add a method called menu_price. It will involve a if statement:
– if “menu 1” print(“Your choice:”, menu, “Price 12.00”)
– if “menu 2” print(“Your...
Question 1:
Use TKinter to create 6 buttons as following picture:
Question 2:
Continue the coding we made with TKinter to create login window as following picture:
...
Question:
A soccer team is looking for girls from ages 10 to 12 to play on their team. Write a program to ask the user’s age and if male or female (using “m” or “f”). Display a message indicating whether the person is eligible to play on the team.
Sample Input 1:
Age:...
Question:
The Body Mass Index (BMI) is one of the calculations used by doctors to assess an adult’s health. The doctor measures the patient’s height (in meters) and weight (in kilograms), then calculates the BMI using the formula:
BMI = weight / (height * height)
Write a program...
Question:
The clothing factory made very nice t-shirts. But it’s very tired for the staff to get hundreds of pieces of clothing shipped to the store! So they want to find the shortest route to the store from the clothing factory, you can help them?
Input Format
There...
Problem Description
Suppose we have a number like 12. Let’s define shifting a number to mean adding a zero at the end. For example, if we shift that number once, we get the number 120. If we shift the number again we get the number 1200....