Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using PyCharm (Python) perform the following: Your program must have a header. Use the programming style guide for guidance. This program will perform various calculations

Using PyCharm (Python) perform the following:

  • Your program must have a header. Use the programming style guide for guidance.
  • This program will perform various calculations (addition, subtraction, multiplication, division, and average calculation)
  • This program will contain a variety of loops and functions.
  • The program will add, subtract, multiply, divide two numbers and provide the average of multiple numbers input by the user.
  • Define a function named performCalculation which takes one parameter. The parameter will be the operation being performed (+, -, *, /).
    • This function will perform the given prompt the user for two numbers then perform the expected operation depending on the parameter that's passed into the function.
    • This function will print the calculated value for the end user.
  • Define a function named calculateAverage which takes no parameters.
    • This function will ask the user how many numbers they wish to input.
    • This function will use the number of times to run the program within a for loop in order to calculate the total and average.
    • This function will print the calculated average.
  • This program will have a main section which contains a while loop. The while loop will be used to allow the user to run the program until they enter a value which ends the loop.
  • The main program should prompt the user for the operation they wish to perform.
  • The main program should evaluate the entered data using if statements.
  • The main program should call the necessary function to perform the calculation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

5. Give examples of variations in contextual rules.

Answered: 1 week ago

Question

f. What stereotypes were reinforced in the commercials?

Answered: 1 week ago