Reference no: EM132354730
Answer the following Question :
1. Write the function maxVal ( a , b ) which returns the larger of integers a and b. Write a script which tests maxVal interactively within a print statement.
2. Write the function sum Vals ( X , Y , Z ) which returns the sum of integer values X, Y, and z. Write a script which tests sum Vals, interactively, within an assignment statement. Use* variables first , second , third and total.
3. Write the function is Neg ( n ) which returns True if integer n is negative , False otherwise. Write an interactive script to test is Neg in an if . .. then statement to print an appropriate message.
4. Write the function is Upper ( ch ) which returns True if character ch is an upper case letter, False otherwise. Write an interactive script which tests is Upper in an if . .. then statement to print an appropriate message .
5. Write the function amt Due ( p , 9 ) which returns the product of integer value p times integer q. Write an interactive script which tests amt Due in a print statement. Use* variables price and quantity.
6. Write the function low Equiv ( ch ) which returns the lower case equivalent of character ch if ch is an upper case letter, or the function returns ch if ch is any other kind of character. Write an interactive script which tests low Equiv.