Question: Create the following functions. Once created, call them from your python (below the functions) in your code. Be creative with your validation functions. If written

    • Create the following functions. Once created, call them from your python (below the functions) in your code. Be creative with your validation functions. If written correctly, you should be able to use the same validation functions for many of the problems below.
    • Make sure that all important procedures have a procedure comment block.
    • Make sure there are 3 blank lines after the end of a procedure and before the next procedure comment block.
    • Make sure your procedures are in the same physical order that they are called.
  1. Write a function named DisplayInstructions that will display the follow message:

This program will demonstrate how to make and use procedures in Python...

In addition, it will demonstrate how to pass values and variables into

a procedure as parameters. It will demonstrate Python deals with ByRef and ByVal.

Call the DisplayInstructions subroutine from main.

  1. Write a subroutine named DisplayMessage that takes an integer parameter intPrintCount. The subroutine should print the message "I Love ***** " intPrintCount number of times.\

**** - should be whatever it is your love.

Call the DisplayMessage subroutine from main.

  1. Write a function named GetLargerValue that takes two integer parameters intValue1 and intValue2 and validates that both are integers and above 0. The function should return the larger of the two values. Once returned, print the result.
  2. Write a function named GetLargestValue that takes seven integer parameters intValue1 through intValue7 and validates that all are integers and above 0. The function should return the largest of the seven values. Once returned, print the result.
  3. Write a function named CalculateSphereVolume that takes one integer parameter intDiameter and validates that it is an integer greater than 0. The function should calculate and return the volume of a sphere with the specified diameter using the following formula: V = 4/3 * Pi * r^3. Once returned, print the result.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!