CIS 221  |  Atkins  -  atkinslc@jmu.edu  |  Lough  -  loughsr@jmu.edu

Have a general Python or class question? Check 3, then ask me

Common issues and questions for beginning Python programmers

How do I know if I'm in the shell or the editor (IDLE)? 

The Python shell will always have some text at the top that shows the version of Python, a date, and copyright information. The shell will also have the Python prompt (>>>). If you type code at the prompt, the code will execute, but only one time. Code typed into the shell cannot be saved to run again later.

How do I get to the editor (IDLE)?

On Windows, even if you click IDLE from the menu list, Python will open the shell. From the shell, go to File --> New File. This will open the editor. From here you can type in your code and save the file with an appropriate name.

My program file has a bunch of stuff that I didn't type. 

If your program file looks something like the image below, you have saved the Python shell instead of your Python source code. The saved shell is really nothing more than a screenshot - it won't run.

When I run my program, I can't see the code. It opens a black screen, then quickly shuts down.

If your program displays something that looks like this image, you are running the program as a command. Instead, Open the program in either Thonny or IDLE so that you can see the code. Use F5 to run the program from there.

The assignments mention captions and comments. What's the difference?

A caption refers to the text content that explains a value. For example, in the following image, "The product of 12*3 is:" is a caption that explains what the number 36 is.

Without the caption, the number will not have any context or explanation:


A comment is a notation in the Python code (or any programming code) that explains what the code does. Comments can only be seen in the code, they will never display as the program runs. The following image shows two ways to code Python comments:

Do spaces in the code matter?

It's always a good idea to have blank lines in the code, where it make sense. A block of code, for example, may have a blank line before and after to separate it from other block of code. Here are some examples.

There are industry-recognized best practices for writing Python code; these guidelines are know as PEP-8. Real Python has a very good video and article that discusses PEP-8.

My file won't run at all.

Are you tring to run a .zip file? Or run the program from OneDrive?

All files must be extracted from the .zip folder before they will work properly. In the directory, right-click the .zip folder, then choose "Extract All...". Save the extracted files to a location on the machine you are working on.

OneDrive is a great place to store your files so that they are safe and you can always get to them. But the .py files don't always run correctly from there, so you should download them to the machine you are working on before trying to run them.

Can I use .format() or %-formatting instead of f-strings?

No

f-strings are the current industry standard for formatting output in Python.

.format() and % formatting are older techniques and would not be acceptable in new software development.

Frequently Asked Questions About CIS 221

Course, Department, and College policies are addressed in the syllabus. The questions here are general questions that may not be covered in the syllabus.

When are the Learning Assistant Office Hours? 

  • Sunday: 3:00 - 7:00
  • Monday: 5:00 - 7:00
  • Tuesday: 5:00 - 7:00
  • Wednesday: 5:00 - 7:00
  • Thursday: 5:30 - 7:30

What are Learning Assistants?

The CIS Learning Assistants hold office hours that any CIS 221 student can attend. Learning Assistants can help with PA problems, test study skills, homework questions, etc.

Learning Assistants will not grade assignments or discuss grades with students. They will help with specific questions, but not overall look and feel of your program.

Learning Assistant office hours are held in Hartman 2009; the schedule can be found under the tab "When are the Learning Assistant Office Hours?".

Can I use a previous version of the textbook? 

The 4th edition is acceptable. The significant difference from what we will cover is related to formatting output. Make sure to pay close attention to f-strings, which are NOT covered in 4th edition of the book.

Do I need an appointment for office hours? 

No, office hours are set aside specifically for students to come in and talk to me. Additionally, if my door is open outside of posted hours, you are welcome to stop in.

What happens during office hours? 

Office hours are set aside specifically for students to come in and talk to me. Here are some things students might want to talk about:

  • Questions about the material or an assignment
  • Review a grade on a test or assignment
  • Study methods for success in 221
  • CIS major or minor
  • CIS 221 Learning Assistants
  • Prearranging a different time for a test (granted on a case-by-case basis)
  • ODS accomodations
  • Homework group issues
  • Anything else that you might be concerned about

What is the format of the tests? 

Tests will include both multiple choice and short answer questions. For each test you should know the terminology, concepts, and how to interpret code.

Are the tests cumulative?

You should consider all CIS 221 tests, including the final, to be cumulative. Each module builds on the concepts from the previous module, so you will always see material carried forward from test to test.

How are the tests graded?

Atkins tests are on Canvas and are graded by Canvas. I always review them, especially fill-in-the-blank and written answers.

When is the final? Where is the final? Is the final cumulative?

The final exams for all of my 221 sections will be scheduled according to the JMU Registrar's Final Exam Schedule.

Unless otherwise stated, the final will be in our regular classroom

Even though it takes place during Exam Week, the 'final' is really just Test 4. All tests should be considered cumulative.

How can I find my homework group?

On the Dashboard page in Canvas, you should see a link for Groups. You will see all Canvas groups, for any class, that you have been assigned to. CIS 221 group names will begin with 221-Group...

My homework group isn't working out. Can I switch groups?

Come to office hours to talk about what's going on in the group. There are times when I will move someone to a different group or switch up all the groups.

I missed the deadline and now the assignment is closed. How can I turn in my work?

Late assignments are not accepted.

I missed the Reading Quiz - is there any way I can still take it?

Reading Quizzes are generally available for at least one week. Once the deadline has passed, the quiz will not be reopened.