Lab Activity 0

In this lab you will do some preparatory work to ensure you are up and running with various systems you'll need to use during this course.

During your scheduled lab time, UTAs will be available in Baldy 21 to help you if you have questions or need assistance.


Part A - UB Infinite

If you have not yet set up your UBInfinite account, so do now.

Open UBInfinite and make some progress on the first 2 skills (Expression and Variables). If you have any issues setting up or using UBInfinite, make certain you talk with a UTA or instructor to get these solved now.

You will need to have 3 stars on ALL of the current week's UBInfinite skills before the deadline to earn homework points that week. For this week, you must complete Module 1's Expressions AND Variables skills by the deadline.

Lab activities are available to you from 24 hours BEFORE the start of your lab time until 24 hours AFTER the end of your lab time. To earn points on a lab activity, you must submit your work as directed during those 50 hours.


Part B - replit.com

If you have not done so, create your replit.com account. Because repls are publicly viewable, choose a username that is NOT your UBIT ID nor your name.

Create a Python repl (when creating the repl, select Python and NOT Python 2.7),

giving it a name of your choice:

Once your repl has been created, you should see a view like this one:

copy the following two lines and paste them into the main.py file:

def my_first_python_submission():
    return False

It will look something like this:

We'll explain in a few days what this means - for now we just want you to walk through the basic steps of creating a program, submitting the program, and seeing the result when your answer is incorrect AND when your answer is correct.

Do NOT use the Safari web browser as it has some settings that make submitting work difficult. Chrome, Firefox, Edge, and other browsers are much easier for this process.

Everyone should click on the 3 vertical dots above the name main.py, and select "Download as zip" from the menu.

Make a note of where the file is downloaded.


Part C - AutoLab

Go to AutoLab and sign in with your UBIT username and password.

Once you are logged in you should see an Activity 0 link for CSE115. Click on Activity 0 to get to a submission page.

To submit: read the academic integrity policy. In order to submit, you must check the "I affirm" box stating you followed that policy, then click the "SUBMIT" button. This opens a window where you can select the zip file you just downloaded to submit it. If you submit your file correctly, you will see a screen like this:

AutoLab will now go through the steps to grade your submission. For problems such as this one, it will take about 15 seconds for the grading to complete. In order to see the grade, you will need to refresh the page. You should wait patiently for the 15 seconds to elapse before refreshing, but I always keep hitting refresh until the page shows a number in the column labeled Score (0.0) meaning that a score has been posted:

The number in the Score (0.0) column is the number of points the submission earned. Since this activity is ungraded, the points will always be 0 for today, but this will show the actual score in future (graded) weeks. To see more feedback (including an explanation of where points were lost), click on the number of points earned. I had you include a bug in your first attempt to see how this works. Because of this bug, when you click on the score you should see this:

  Autograder [Thu Jan 20 09:24:27 2022]: Received job CSE115-s22_activity0_1_mhertz@buffalo.edu:568
  Autograder [Thu Jan 20 09:24:44 2022]: Success: Autodriver returned normally
  Autograder [Thu Jan 20 09:24:44 2022]: Here is the output from the autograder:
  ---
  Autodriver: Job exited with status 0
  FAILED test_simpleTestForCorrectness:
  	I called my_first_python_submission()
  	expecting the result to be true,
  	but your function returned false.


     ====> You can fix errors and re-submit. <====
  ================================================================================
                            TEST ERROR AND FAILURE DETAILS
  ================================================================================
  Error while running tests.TestLabActivity.test_simpleTestForCorrectness
  --------------------------------
  Traceback (most recent call last):
  AssertionError: True != False :
  	I called my_first_python_submission()
  	expecting the result to be true,
  	but your function returned false.

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
  Exception

  ================================================================================
                                   GRADING SUMMARY
  ================================================================================

  Ran 1 test but 0 passed :-(
  { "scores" : { "Score" : 0 } }

  Score for this problem: 0.0

  Graded by:

The first five lines are not meaningful, but after those 5 lines we can see the grading results. This submission shows that the first (and only) test FAILED and then provides an expanation of what was wrong:

    I called my_first_python_submission()
    	expecting the result to be true,
    	but your function returned false.
  

The error was that I told you to write False in your code when the problem required us to write True. Go back to replit and replace that False with the boolean literal True. Your code should now look like this:

Go through the steps and re-download your repl as a zip file and then submit the new zip file to AutoLab. Once you submitted the second zip file, you should see a screen like this:

After you see this screen you will need to wait another 15 or so seconds for your new submission to be graded. You can either wait patiently during that time (or do like me and keep hitting refresh until the second score is posted):

Clicking on the result from our most recent submission should show you this screen:

Autograder [Thu Jan 20 09:38:05 2022]: Received job CSE115-s22_activity0_2_mhertz@buffalo.edu:569
Autograder [Thu Jan 20 09:38:32 2022]: Success: Autodriver returned normally
Autograder [Thu Jan 20 09:38:32 2022]: Here is the output from the autograder:
---
Autodriver: Job exited with status 0
PASSED test_simpleTestForCorrectness:
	I called my_first_python_submission()
	expecting the result to be true,
	and it was!
================================================================================
                          TEST ERROR AND FAILURE DETAILS
================================================================================
================================================================================
                                 GRADING SUMMARY
================================================================================

Ran 1 test and it passed :-)
{ "scores" : { "Score" : 0 } }

Score for this problem: 0.0

Graded by:
    

See how it says PASSED before the test's name? That means our code worked. You will be able to resubmit lab activities and lab exams until the time it is due, so it is important to check these logs to understand what needs to be fixed. But remember AutoLab records LAST submissions's score for your grade so you need to make certain that last submission earns as many points as you can.

Hopefully you have an understanding of how these systems will work before any graded work is due. I encourage you to continue experimenting with replit, AutoLab, and UBInfinite during this lab and ask the lab TAs any questions you may have. Once you feel prepared for the work ahead, you can leave the lab.

{% module Footer() %}