quiz7_sol - CS 010 Intro to Computer Science I Spring -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 010 – Intro to Computer Science I Spring - 2008 Quiz 7 – Friday 5/23 SOLUTION 1. What is the difference between a parameter and an argument, in the context of functions? a. The value of an argument must be known at compile time, the value of a parameter can be assigned at run time. b. The value of a parameter must be known at compile time, the value of an argument can be assigned at run time. c. No difference - they are alternative terms for the values passed into a function d. Arguments relate to the function invocation, parameters relate to the function definition e. Parameters relate to the function invocation, arguments relate to the function definition f. b) and e) 2. Which of the following conditional expressions is exactly equivalent to: ( !(country == "USA" and state != "AK" and state != "HI") ) a. ( country != "USA" or state == "AK" or state == "HI" ) b. ( country == "USA" or state == "AK" or state == "HI" ) c. ( country != "USA" and state == "AK" and state == "HI" ) d. ( country == "USA" and state == "AK" and state == "HI" )
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/05/2008 for the course CS 010 taught by Professor Linard during the Spring '08 term at UC Riverside.

Page1 / 2

quiz7_sol - CS 010 Intro to Computer Science I Spring -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online