Quiz Week 14

Survey Time

Please fill out the survey to evaluate your professors. These are very important tools to give feedback to your professors and we do take it very seriously. For myself I really appreciate the comments that you provide to help improve my teaching going forward. Even after 22 years of teaching I still have much to learn and especially from you the students.

You can enter the survey by going to https://mitecbeta.itesm.mx and then search for ECOA.

Thanks for doing this, I appreciate it and look forward to 100% of my students doing this.

Self Evaluation Time

Please check which of the Mastery topics you have covered in your blog posts. I created a Google spreadsheet which you can copy in order to keep track of this. Feel free to use “File->Make a copy.” to do that for yourself.

You can find that spreadsheet here: http://url.kenbauer.me/tc1014mastery

Feature Photo Credit

<a title="Powerpoint Slide:   "Teachers should be activators"" href="https://flickr.com/photos/kenwhytock/8471566783">Powerpoint Slide:   "Teachers should be activators"</a> flickr photo by <a href="https://flickr.com/people/kenwhytock">Ken Whytock</a> shared under a <a href="https://creativecommons.org/licenses/by-nc/2.0/">Creative Commons (BY-NC) license</a> </small>
Powerpoint Slide: “Teachers should be activators” flickr photo by Ken Whytock shared under a Creative Commons (BY-NC) license

QuizWeek#11

Practice Exam

Download and attempt to solve the problems in the attached exam file.

The real exam next week will be shorter but drawn from these questions.

I would expect everyone to be able to do all except #8 and #9 now but I know there are some of you that could do those now.

Featured Image Credit

<a title="2016/366/26 Pair Programming" href="https://flickr.com/photos/ken_bauer/24271690249">2016/366/26 Pair Programming</a> flickr photo by <a href="https://flickr.com/people/ken_bauer">kenbauer</a> shared under a <a href="https://creativecommons.org/licenses/by-sa/2.0/">Creative Commons (BY-SA) license</a> </small>
2016/366/26 Pair Programming flickr photo by kenbauer shared under a Creative Commons (BY-SA) license

 

Quiz Week 09

Distance

Write a function that receives four parameters: x1, y1, x2, y2 which are all floating point values.

The function is called distance and returns (float) the distance between x1,y1 and x2,y2 on the cartesian coordinate plane.

What to Submit

Post on your blog your solution and include your code somehow (image, in the post or via GitHub) and remember to include the hashtag #quiz09

Featured Image Credit

<a title="distance..." href="https://flickr.com/photos/iloveakira/5090708070">distance...</a> flickr photo by <a href="https://flickr.com/people/iloveakira">Pia Kristine</a> shared under a <a href="https://creativecommons.org/licenses/by-sa/2.0/">Creative Commons (BY-SA) license</a> </small>
distance… flickr photo by Pia Kristine shared under a Creative Commons (BY-SA) license

Quiz Week 8

Two Activities

  • Please fill out our mid-semester survey. This will not take long at all and in the spirit of non grading based on points, there is simply two open questions. How can you improve and how can Ken help you improve your learning.
    Fill out that survey here: http://url.kenbauer.me/midtermsurvey
  • Write a function that calculates returns the “nth” Fibonacci number where we define a function over the Fibonacci numbers mapping the naturals (starting with zero) to the Fibonacci series. So fibonacci(0) returns 0, fibonacci(1) returns 1, fibonacci(2) returns 1 and so on. Note that we are using the modern definition where the sequence starts with zero. You should try to implement this with two solutions: one with a loop and one with recursion. Which do you think is “better”, which looks more “elegant”, which is more “efficient”?

Featured Image Credit

<a title="Fibonachess" href="https://flickr.com/photos/fdecomite/3200758169">Fibonachess</a> flickr photo by <a href="https://flickr.com/people/fdecomite">fdecomite</a> shared under a <a href="https://creativecommons.org/licenses/by/2.0/">Creative Commons (BY) license</a> </small>
Fibonachess flickr photo by fdecomite shared under a Creative Commons (BY) license

 

Quiz Week 5

Just getting Warmed Up

So these 46 should be your aim through the entire semester, how about trying to do the first five for this week’s quiz?

 

The Exercises

You can find the exercises at http://www.ling.gu.se/~lager/python_exercises.html

What to Do

I would recommend putting each of your solutions in your GitHub account in a repository dedicated to this challenge.

Feature Photo Credit

<a title="Exercise" href="https://flickr.com/photos/astrid/4151899795">Exercise</a> flickr photo by <a href="https://flickr.com/people/astrid">AstridWestvang</a> shared under a <a href="https://creativecommons.org/licenses/by-nc-nd/2.0/">Creative Commons (BY-NC-ND) license</a> </small>
Exercise flickr photo by AstridWestvang shared under a Creative Commons (BY-NC-ND) license

Quiz Week 4

Minimum and Squares

For this quiz I want you to (in class) create a program with two functions:

  • def minimum_three(x, y, z):  # returns the value that is smallest of x, y and z
  • def sum_squares(x, y, z): # returns the value of the sum of squares of x, y, z

What to Do

You implement these function in your own program in a file quiz4.py

You should make a main routine that asks the user for three numbers and then calls your functions to which should *RETURN* the value and you print in the main part of your program.

Publish your code on your own blog today (during class time is best) and use the tag #Quiz04 so it shows up nicely in our tag cloud.

Feature Image Credit

<a title="squares" href="https://flickr.com/photos/inthe-arena/7216039450">squares</a> flickr photo by <a href="https://flickr.com/people/inthe-arena">amseaman</a> shared under a <a href="https://creativecommons.org/licenses/by-nc-nd/2.0/">Creative Commons (BY-NC-ND) license</a> </small>
squares flickr photo by amseaman shared under a Creative Commons (BY-NC-ND) license

Quiz Week 3

Functions

For this quiz I want you to (in class) create a program with two functions:

  • def square_root(x):  // returns the square root of x (float)
  • def cube_root(x): // returns the cube root of x (float)

What to Do

You implement this function in your own program in a file quiz3.py.

You should make a main routine that asks the user for a number and then calls your functions to calculate the square and cube roots of that number and prints them out.

What should you do if the user enters a negative number?

Publish your code on your own blog today (during class time is best) and use the tag #Quiz03 so it shows up nicely in our tag cloud.

Feature Image Credit

<a title="Square roots" href="https://flickr.com/photos/ronaldc5/14927947186">Square roots</a> flickr photo by <a href="https://flickr.com/people/ronaldc5">Ronaldc5</a> shared under a <a href="https://creativecommons.org/licenses/by/2.0/">Creative Commons (BY) license</a> </small>
Square roots flickr photo by Ronaldc5 shared under a Creative Commons (BY) license