Sample Placement Exams for Placement out of CSCI-UA.2:
Sample Placement Exams for Placement out of CSCI-UA.4:
The Java version of the placement exam covers the following topics:
The Java version of the placement exam does NOT cover:
Reference: any book on Java programming.
Fill in the spaces marked with ______ to complete the following Boolean expressions. Do not use the Boolean operator "!" in your answer. Write only in the spaces marked with ______. Assume that X, Y and Z are integer variables.
An expression that is true if X is strictly the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 45, the expression should be true, but if X is 50, Y is 40, and Z is 50, the expression should be false, since X is not strictly greater than Z.
(______) ______ (______)
An expression that is true if X is is one of the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 50, the expression should be true.
(______) ______ (______)
Assume that System.out.print and System.out.println are print functions (the latter printing a carriage return after the output) and assume that there is a method IO.readInt() that reads in an integer. Consider the following method (procedure) in some class:
public static void main() { int n, k, max; max = IO.readInt(); /* read value for max */ for (n = 0; n < max; n++) { for (k = 0; k < max; k++) { if (n > k) System.out.print(" G "); else if (n > k) System.out.print(" L "); else System.out.print(" E "); } System.out.println(); } }
Show the output of main()
if:
The JavaScript version of the placement exam covers the following topics:
Note: the placement exam uses the prompt() and alert() methods to receive input from a user and to output messages to the user, respectively.
The JavaScript version of the placement exam does NOT cover:
Reference: any book on JavaScript programming.
Fill in the spaces marked with ______ to complete the following Boolean expressions. Do not use the Boolean operator "!" in your answer. Write only in the spaces marked with ______. Assume that X, Y and Z are integer variables.
An expression that is true if X is strictly the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 45, the expression should be true, but if X is 50, Y is 40, and Z is 50, the expression should be false, since X is not strictly greater than Z.
(______) ______ (______)
An expression that is true if X is is one of the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 50, the expression should be true.
(______) ______ (______)
Assume that the alert() function prints values of any data type to the screen, and assume that there is a function prompt() that receives input from the user as a string. Consider the following function:
function main() { var n, k, max; max = prompt("Please enter an integer"); /*read value for max */ max = parseInt(max); for (n = 0; n < max; n++) { for (k = 0; k < max; k++) { if (n > k) alert(" G "); else if (n > k) alert("L"); else alert("E"); } } }
Show the output of main()
if:
The C++ version of the placement exam covers the following topics
int main() { int number1, number2; cin >> number1 >> number2; /* read two numbers */ cout << "The first number that was input was " << number1 << endl; cout << "The second number that was input was " << number2 << endl; ... }
The C++ version of the placement exam does NOT cover
Reference: any book on C++ programming.
Fill in the spaces marked with ______ to complete the following Boolean expressions. Do not use the Boolean operator "!" in your answer. Write only in the spaces marked with ______. Assume that X, Y and Z are integer variables.
An expression that is true if X is strictly the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 45, the expression should be true, but if X is 50, Y is 40, and Z is 50, the expression should be false, since X is not strictly greater than Z.
(______) ______ (______)
An expression that is true if X is is one of the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 50, the expression should be true.
(______) ______ (______)
Consider the following program:
int main() { int n, k, max; cin >> max; /* read value for max */ for (n = 0; n < max; n++) { for (k = 0; k < max; k++) { if (n > k) cout << " G "; else if (n < k) cout << " L "; else cout << " E "; } cout << endl; } return 0; }
Show the output of the program if
The C version of the placement exam covers the following topics:
int main() { int number1, number2; scanf("%d", &number1); scanf("%d", &number2); printf( "The first number that was input was %d \n", number1 ); printf( "The second number that was input was %d \n", number2 ); }
The C version of the placement exam does NOT cover:
Reference: any book on C programming
Fill in the spaces marked with ______ to complete the following Boolean expressions. Do not use the Boolean operator "!" in your answer. Write only in the spaces marked with ______. Assume that X, Y and Z are integer variables.
An expression that is true if X is strictly the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 45, the expression should be true, but if X is 50, Y is 40, and Z is 50, the expression should be false, since X is not strictly greater than Z.
(______) ______ (______)
An expression that is true if X is is one of the largest of the three variables X, Y and Z. For example, if X is 50, Y is 40 and Z is 50, the expression should be true.
(______) ______ (______)
Consider the following program:
int main() { int n, k, max; scanf("%d", &max); /* read value for max */ for (n = 0; n < max; n++) { for (k = 0; k < max; k++) { if (n > k) printf(" G "); else if (n > k) printf(" L "); else printf(" E "); } printf("\n"); } return 0; }
Show the output of the program if:
The Python version of the placement exam covers the following topics:
The Python version of the placement exam does NOT cover:
Reference: any book on Python programming
Write a program that reads 10 different integers and prints the one that has the largest value.
Consider the following: (Note that print(...end='') will print to the same line; and print( ... ) will print to the next line.)
m = int(input("Enter a number: ")) for n in range(m): for k in range(m): if (n > k): print (" G ", end='') elif (n < k): print (" L ", end='') else: print(" E ", end='') print(" ")
Show the output if:
The Web Design placement exam covers the following topics:
It does NOT cover:
How is the padding property used in CSS? Describe and illustrate your answer with code.
Given the following excerpt from a webpage:
<head> <title>Come to New York City!</title> <link href="styles1.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .lowerHeading { font-variant: small-caps; color: #336699; } </style> </head>
For further information, please e-mail the Undergraduate Program Administrator.