Regrades
If you have concerns about an item that was graded (lab, apt or
assignment), you have one week after the grade is posted to fill out the
regrade form here.
APT Quiz
Click here to go to the APT Quiz page
APTs
See below for hints on what to do if your APT doesn't run.
For each problem in an APT set, complete these steps by the due date
- first test it and get it working correctly using the Test
link
- then submit the code for grading using the Submit
link
- check your grade on the grade code page
by clicking on check submissions
- then fill out the REFLECT form for each APT you do to give us feedback
on that problem and to certify that you understand the code for that APT.
In solving APTs, your program should work for all cases, not just the
test cases we provide. We may test your program on additional data.
We may do some APTs partially in class or lab, but you still have to do
them and submit them.
There will usually be extra apts listed. You can do more than required to
challenge yourself. We do notice
if you do more APTs than those required.
If you do extra APTs, they still have to be turned in on the due date.
Problems Running an APT? Some Tips!
Here are some suggestions if your APT does not run. THESE ARE COMMON
ERRORS CompSci 101 STUDENTS MAKE.
- Make sure you have the correct file name, including case.
- Make sure you have the correct def statement, the first line of your
method definition. Strongly recommend you cut and paste it.
- If you don't get any red or green boxes, try commenting out the code
for your function and just return something simple, return 1 if the return
type is an integer, return "bogus" if the return type is a string. You
won't have the correct answer but you should have the red and green boxes.
- Do you have a return statement? Your function should end with a return
statement, not a print statement. Do you have a return at the end of the
function? Maybe you have an if with return statements but not one at the very
end just in case one of the other cases don't match. Put a return at the
end of your function (that is not inside an if or for) with a value you don't
expect to return such as return "bogus" if you are suppose to return a
string.
If you are suppose to return an int, then return -785673 or some number you
really shouldn't get.
- Do you have the correct type of value to return? If the function is
suppose to return an integer, are you returning an integer?
- If you are getting timelimit exceeded and have tried all the things
above, put in a print statement at the top of your function such as
print "starting function"
When you run it, does that show up? Note it will show up for each sample
input it runs on. If it does show up, try adding in other print statements
to see if they show up.
- Sometimes Eclipse tries to "help you" and adds in an extra strange
import statement
at the top of your program. Something weird like:
from StdSuites.Text_Suite import word
If you didn't put that in your file, then delete it.
- If your output looks exactly like the output is suppose to but is RED
instead of GREEN, then you
may have an extra blank that doesn't show up. The string "frog" and "frog "
are different, the first is of length 4 and the second is of length 5.
If the string you are returning is the variable answer, instead return the
string "X"+answer+"X". You won't have the correct answer, so you will get
all reds, but you might notice extra blanks on either or both ends of your
answer.
- If you are getting red and green boxes but cannot figure out what is
wrong with your code, then try copying your code into Python Tutor. You
will also need to add a statement to call the function with some
input. Then you can trace through it in Python Tutor and see the values of
variables. If you have long statements like:
x = stuff.lower().find('x')
Break them into more lines and add more variables so you can see the
intermediate results. Such as:
temp = stuff.lower()
x = temp.find('x')
-
If you don't know where to start. Try the 7 steps! Step 1: Work a simple example by
hand. Then think about what you did... how did you solve it. Did you
iterate over words in a list, over characters in a string, etc. What did
you keep track of? How does the data need to be stored? In a list?
something else?