Readings

The readings for Tuesday, September 06 are:

  1. Automate the Boring Stuff with Python

  2. Python for Informatics: Exploring Information

Questions

Once you have completed these readings, please answer the following questions:

  1. Given a = False and b = True, what is the result of the following expressions?

    A. a
    B. b
    C. a and b
    D. a or b
    E. not a
    F. not b
    G. (not a and b) or (a and not b)
    H. not (a and b)
    
  2. Given the following code:

    if n % 3 == 0:
        print 'Fizz'
    elif n % 5 == 0:
        print 'Buzz'
    else:
        print n
    

    What is the result of executing the code above when n is each of the following values:

    • 1
    • 3
    • 5
    • 6
    • 10
    • 15
  3. Describe how you would check if a number n is between 0 and 9 (inclusive).

Feedback

If you have any questions, comments, or concerns regarding the course, please provide your feedback here.

Submission

To submit your response, please edit the reading02/README.md file in your GitLab repository.