
Concept explainers
Hello, I need help in creating a flowgorithm from this python code.
Here is the code below:
print("Type '1.1' if your given value is radius, '1.2' for diameter, and '1.3' for area ")
function = float(input("Enter the letter to start solving: "))
while function == Radius:
print('You have chosen radius.')
radius = float(input("Enter radius: "))
Circumference1 = 2 * math.pi * radius
print("The Answer is: %.4f" % Circumference1)
break
while function == Diameter:
print('You have chosen diameter.')
diameter = float(input("Enter diameter: "))
Circumference2 = math.pi * diameter
print("The Answer is: %.4f" % Circumference2)
break
while function == Area:
print('You have chosen area.')
area = float(input("Enter Area: "))
Circumference3 = 2 * math.sqrt(math.pi * area)
print("The Answer is: %.4f" % Circumference3)
break
print()
print("Thank you for your participation! ")

Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images

- i am after a python Graphical User Interface (GUI) for the question shown in the image: the GUI must implement the following code: #creating function def account(): # taking input for amount deposited 'p' p = int(input('Enter number of deposited amount:$')) # taking input for stated interest rate 'r' r = float(input(' Enter stated interest rate: ')) # taking input for coumpounding interest 'm' m = int(input(' Enter compounding interest: ')) # Now calculating account balance account_balance = p*(1+(r/m))**m print(account_balance) # Now calculating Annual percentage yield (APY) APY = (1+(r/m)**m)-1 # if in case account balance comes greater than 1000$ than it will calculate APY if account_balance > 1000: print(APY) account() as well as it must have all these: Use the Grid element• Add Label elements throughout your GUI.• Use the Background Colour property.• Allow a user to select choices from an either list box, drop-down menu, or scroll-down menuelement. Allow a user to input…arrow_forwardCan you solve this question with the flowchart showing clearlyarrow_forwardI can't seem to figure this out.. for python You have a business that cleans floors in commercial space and offices. You charge customers $0.45 per square yard, and some customers require multiple cleanings every month. You need two custom functions for your business. The first function takes a floor's length and width in feet and returns the area in square yards. The second void function takes the area, charge per square yard, and number of monthly cleanings as arguments and prints the cleaning cost. This latter function uses selection logic to print different output for single and multiple monthly cleanings (see Sample Outputs). Use a properly named constant for the charge per square yard, too.arrow_forward
- Use Python Write the code needed to get an integer value from standard input, calculate the square root of the value rounded to the nearest hundredth, then print a message with the result. Format your output so that it matches the output format of the examples, otherwise your solution will be marked incorrect. NOTE: You may assume that the input value will not be negative. REMINDER: Start by importing the math module. Use the function math.sqrt to calculate a square root. Use the int function to convert the input from a string to an integer. DO NOT use prompts in your input statements for this problem. For example: Input Result 11 the square root of 11 is about 3.32 95 the square root of 95 is about 9.75 3 the square root of 3 is about 1.73arrow_forwardHi, I need to solve this problem with C++ programming language using Visual Studio. Thank you.arrow_forwardHow do you: Construct a program that calculates the course overall grade point average (GPA). The program must input 3 scores for each of the categories listed in the calculation of the GPA provided below with exception of the final examination. The maximum score for all quizzes is 20 points each, the maximum score for all homework assignments is 50 points each, the maximum score for all tests and all programming assignments is 100 points each, and the maximum for the final examination is 120 points. You can select the scores that you make on each of these assessed items. Assignments Scale Homework 10 % Programming Assignments 25 % Quizzes (Weekly) 15 % Tests 30 % Final Examination 20 % You must develop the formula for calculating the GPA using the information provided in the table. For example if the final examination has a maximum score of 120 and you get an 85. Then your weighted score for the final examination is calculated using the…arrow_forward
- Transient PopulationPopulations are affected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population P The annual birth rate (as a percentage of the population expressed as a fraction in decimal form)B The annual death rate (as a percentage of the population expressed as a fraction in decimal form)D The average annual number of people who have arrived A The average annual number of people who have moved away M The number of years to display nYears Write a function that calculates the size of the population after a year. To calculate the new population after one year, this function should use the formulaN = P + BP - DP + A - Mwhere N is the…arrow_forwardSuppose in PYTHON, you have written a program to calculate the area of a polygon and you have stored that value in the variable "polyArea." Write a statement that will output the statement, "The area of the ploygon is," followed by the area given to two decimal places.arrow_forwardUse Python to write a function display(num). The value of num is the parameter. If num is even, the function will display the even numbers in the range of 1 to num (both inclusive). If num is odd, the function will display the odd numbers in the range of 1 to num (both inclusive).arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





