Tutor profile: Betul A.
Subject: Python Programming
Create a Python3 function that prints the nth element of the Fibonacci sequence.
def fib(n): # function that finds the nth element of the fib sequence if n < 0: # create case where user puts in a number that is less than 0 print("You goof, wrong input!") elif n == 0: # create a case where the user puts in a 0 return 0 elif n == 1 or n == 2: # create a case where the user puts in 1 or 2 return 1 else: # time to use recursion to find the right element! return fib(n - 1) + fib(n - 2) # test function by running the function print(fib(12)) #answer should be 89
The function p(t) = 75(1.04)^t models p population of a village V in t years after the year 1945. Based on the model, what is the population of the village in 2020?
1420 people (not 1420.9 because you can't have a part of a person)
In "To Kill a Mockingbird" by Harper Lee, there are many different types of characters. Write an analysis of the character Atticus and explain his overall importance to the narrative.
Throughout the story, Atticus acts as a moral compass and hero towards the protagonist Scout and her brother Jem. Lee does this by showcasing how Atticus behaves in different situations. For example, in chapter ten, the children learn Atticus is the best shot in town but has not held a gun in years. This is done to display his caution against violence along with his analytical reasoning. Miss Maudie describes Atticus by saying that "I guess he decided he wouldn't shoot till he had to..." (Lee 130). Atticus thinks his actions through, thus would not jump to a gun the minute a situation goes awry. He would only resort to violence as a final option, which in turn teaches his children the importance of avoiding violence in favor of reasoning and discussion. When Atticus agrees to be a lawyer for Tom Robinson, a wrongfully accused African American in the South 1900s, the town gets angry at him. They were about to attack him and his client when Scout comes. She goes to one of the attackers, the father of a classmate, and tells him his son is a good friend and kid. This single amount of compassion and calm from a child singlehandedly calmed the attackers and allowed for Atticus and Tom to be safe for the night. Atticus throughout the book teaches his children about morality and proper reasoning in a society ripe with crime and racism. It allows for the protagonist Scout to develop into a more mature character by the end of the story.
needs and Betul will reply soon.