{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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 Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 2

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

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

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