Question 1 I had to write a function that receives a single float parameter and calculates the value of e using sufficient terms, until the difference between two successive calculations differ by lessthan the parameter accuracy. https://github.com/CarminaP/Quiz11/blob/master/q1.py Question 2 I had to write a function called checkBanana that receives a name of a file and […]
Done!
In this assignment I had to write a function to calculate the greatest common denominator of two positive integers given by the user using Euclid’s algorithm. I made 3 different versions of the function. On the first one I used iteration, on the second I used a loop based on the successive remainders and the stopping condition […]
Use of comments in Python
User input (text based) in Python
Use of “elif” with a conditional Nesting of conditional statements
Use of comments in Python
User input (text based) in Python
Use of the conditional “if” Use of “else” with a conditional
Use of “elif” with a conditional Nesting of conditional statements
Calling Python function
Creating Python functions
Use of the conditional “if” Use of “else” with a conditional