# 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

# 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.

# 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

# 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”?

# 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.

# 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.

# 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.