faq
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
faq [2011/03/17 22:02] – aan | faq [2011/03/18 16:29] (current) – aan | ||
---|---|---|---|
Line 5: | Line 5: | ||
===I have trouble solving Question 5. Could you give us more hints?=== | ===I have trouble solving Question 5. Could you give us more hints?=== | ||
- | There are a few ways to write this program. I assume you have no problem | + | There are a few ways to write this program. I assume |
reading the input file into a matrix. One way to write the rest of the program is | reading the input file into a matrix. One way to write the rest of the program is | ||
to use a loop to go through all the rows in the matrix. In each pass of the loop, you | to use a loop to go through all the rows in the matrix. In each pass of the loop, you | ||
Line 11: | Line 11: | ||
height in cm, weight in kg, BMI value and BMI category). | height in cm, weight in kg, BMI value and BMI category). | ||
+ | === To answer the second question, can we change our answer to the first question so that it can take a vector as the input? === | ||
- | === === The first question asks us to write a function that takes a scalar input argument. | + | No, you cannot change your function for the first question in order to answer |
- | In the second question, we are asked to use this function. However, in the second question | + | |
- | we need to check 50 numbers. Can we change our answer to the first question so that it | + | |
- | can take a vector as an input? === === | + | |
- | + | ||
- | + | ||
- | + | ||
- | No, you cannot change your function for the first question in order to solve the second | + | |
question. Your program for the second question has to call the function that only | question. Your program for the second question has to call the function that only | ||
- | takes a scalar as the input argument. This should | + | takes a scalar as the input argument. This can be easily done by using a loop. |
faq.1300399333.txt.gz · Last modified: 2011/03/17 22:02 by aan