Question
1. Write and test a function between(arg1,arg2,arg3) with three arguments, all numbers, that returns True if the second argument is between the first and third
1. Write and test a function between(arg1,arg2,arg3) with three arguments, all numbers, that returns True if the second argument is between the first and third arguments, inclusive, and False otherwise.
Notes: There are two ways that the second argument can be between the other two: either arg1 <= arg2 <= arg3 or arg3 <= arg2 <= arg1 Your program should return True in either case.
Unlike most programming languages, Python correctly interprets an expression such as A <= B <= C as meaning the same as (A <= B) and (B <= C).
2.Write a function that satisfies the following description: Function name: avgSum Argument(s): three numbers. The function should print the sum of the numbers and return the average (mean) value of the three numbers.
3.Write a Python function that takes a number as a parameter and check the number is prime or not.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started