Quiz Stuff

Quiz 2, August 29, 2022
Three minutes; six ½-point questions, plus one EC question

  1. Does System.out.println(3+4) have a side effect? (yes/no)
  2. Write a Java expression that has both a side effect and a type of String.
  3. Write a Python expression that has type list and no side effect.
  4. In Java, given int i = 5;, what is the value and type of i++?
  5. Write a Python expression with a value of None.
  6. What are the three aspects of expressions discussed on Haskell slides 30-40?
EC ½ pt: What is the output of print(print("print"))?