Here is the first program of the quiz
https://github.com/dianagdv/TC101/blob/master/Quiz11_1
and this is the second one
https://github.com/dianagdv/TC101/blob/master/Quiz11_2
This quiz was actually difficult but my friend David help me out with the second program. here is the link to my code: p1: https://www.dropbox.com/s/lghpgcyhlyru8oi/quiz11p1.py?dl=0 p2: https://www.dropbox.com/s/3pnyvam4qfq64d8/quiz11p2.py?dl=0
What the heck Ken??! This was torture, maybe I should begin practicing my dancing skills… Ok, it wasn’t that horrible, I helped myself by reading like a thousand times mi various classmates quizzes. The helped a lot!! Go to kenscourses.com if you need any help.
Or help yourself right here:
#Quiz11 #QUIZ11 #TC1017 #Tc101 #BANANA
In this quiz we had to write 2 programs which do the following: Question 1: Write a function called calculateE that receives a single float parameter accuracy and calculates the value of e using using sufficient terms (ie: there are… Continue Reading →
Here is the link for my answers for the #Quiz11
Here’s what I did for the quiz 11 On the first program I asked Luis for help, and for the second one I check this webpage to transform from upper to lower case. Here’s the source code and my GitHub repository.
Hello, this quiz consisted on fulfilling two assignments: calculate the value of e with a given accuracy and open a file and search for the word banana and count them even if they are written in capital letters. The first question was a little tricky since I didn’t actually understand if it should calculate until the given accuracy and then output the value with certain decimals or just do the calculation, so I just set the precision to the number of repetitions required to get to the number. Here’s the code for that problem:
https://github.com/CarlosGallegosT/Codes007/blob/master/Q1.cpp
The last one was a bit more complicated, I had to do some research to understand how to open a file and then turn all of the information into something easier to interact with. Then I found this page: http://stackoverflow.com/questions/7868936/read-file-line-byline. Afterwards, I turned all of the string into lower case letters so when I searche for bananas it would also consider the ones with capital letters. I didn´t understood why it did not work when I hit the Enter button within the file, I guess I will ask about it in class. Anyway, here’s the code:
https://github.com/CarlosGallegosT/Codes007/blob/master/Q2.cpp
I was too confused with this quiz Dx Here’s the answer code of the questions. Question 1: euler Question 2: banana
The first excercise was the same as a WSQ, i just had to change it a little bit. I got in trouble when i tried to make excercise 2 because i didn´t know how to work with files.
I researched a little bit on the book and then i played a little bit with what i found, to make the excercise i just had to combine my new knowledge with my list and string knowledge and that was all. At the end the excercise was very simple, i just had to know how to open a file.
Hint (thinks that you need to know to open a file):
open( “filename.txt”) This will return a file value so put it on a variable
file = open( “filename.txt”)
file.read() This read what is inside that file, returns whatever is written on it so i recommend you to put in on a variable too
If you want to see my code i will post it on Github, here is the link:
https://github.com/Jocapear/TC1014/blob/master/Quiz11.py
Another Blog Quiz Your Quiz#11 is to create a blog post with your answers to the quiz questions. I highly recommend that you place the code on GitHub but will accept links to PUBLIC Dropbox (or Google Drive) files. Write code to solve…