This test consists in two parts: a quiz with questions and a coding part with 4 problems. All, questions and problems, weigh the same towards the final mark.
This test consists in two parts: a quiz with questions and a coding part with 4 problems. All, questions and problems, weigh the same towards the final mark.
Write your answer in the corresponding textboxes or choose the rigth radio buttons/checkboxes.
var x = 7 ;
var y = 2 ;
if ( x == y ) {
alert("True") ;
}
else {
alert("False") ;
}
var x = "Monday" ;
var y = "Sunday" ;
if ( x < y ) {
alert("True") ;
} else {
alert("False") ;
}
var x = 2 ;
if ( x != 2 ) {
alert("True") ;
}
var x = 3 ;
if ( x == 3 ) {
alert("True") ;
}
x = 3 ;
y = 10 ;
if (x > 0){
y = 12;
} else if ( x > 1) {
y = y + 5 ;
} else {
y = 7 ;
}
alert(y) ;
x = -3 ;
y = 10 ;
if (x > 0){
y = 12 ;
}
y = y + 5 ;
alert(y) ;
x
for which the following code will produce the value "No". There may be more than one correct choice.
if ( x < 5 || x > 90) {
alert( "yes") ;
}
else {
alert("No") ;
}
var name1 = "John" ;
var name2 = "Donald" ;
var x = 30 ;
var person = "unknown";
if ( name1 < name2 ) {
person = name1 ;
}
else {
person = name2 ;
}
alert( person ) ;
for( var i = 0 ; i < 10 ; i++) {
print("again")
}
var i = 2
while ( i < 10 ){
print("Hello World")
}