Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create the following user defined functions in Python: a. User defined function

ID: 3752636 • Letter: C

Question

Create the following user defined functions in Python:

a. User defined function to determine the middle character of a string.

middle character of "Peter" is "t"

middle character of "Wilson" is "s"

middle character of "The cake is a lie" is "is"

b. user defined quadratic equation solver function

c. If you don't know anything about the Fibonacci sequence, go ahead and learn something about it. Write a user defined function to determine the n^th term of the Fibonacci sequence. What is the 30^th term?

d. user defined exam grade average finder function

e. Put all of these functions into a user-defined function library

Explanation / Answer

Solution:

UserDefinedFunctions.py

Sample Run:

Middle character of 'Peter' is t
Middle character of 'Wilson' is s
Middle character of 'The cake is a lie' is is
The solution of the given quadratic equation are (-1-1.4142135623730951j) and (-1+1.4142135623730951j)

Quadratic Equation Solver, where a = 1, b = 2 and c = 3 None

Fibonacci series of 30 is: 514229

Grade average of [75, 35, 60, 90, 87] is: 69.4


Note: Please don't change the indentation. Python solely works upon the indentation. If you have any doubt please do comment below before giving any negative feedback. thanks

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote