wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Revision for Quiz #1

Total questions: 16

Worksheet time: 8mins

Name
Class
Date
1.

In programming, syntax is

a)

a set of rules that determine the order symbols and characters have to go in, to create a correct programming document.

b)

an instruction to repeat a series of statements

c)

A way to store information to be used later by the programmer

d)

A way to check a condition and take different paths depending upon that condition

2.

Identify the concept in bold:


Console.WriteLine("Hello World");

a)

Method

b)

Parameter

c)

Class

d)

String

3.

using System;


What does the line above do in a C# program?

a)

Ensures we are using the correct type of computer

b)

Imports the System library which contains code we can use in our programs

c)

Ensures the program is run in the repl.it environment

d)

Let's the computer know we are running a C# program

4.

string name = "John";


In the code above, "John" is a:

a)

String

b)

Library

c)

Parameter

d)

Data Type

5.

string name = "John";


In the line above string is a:

a)

String

b)

Variable

c)

Data Type

d)

Parameter

6.

string name = "John";


In the line above name is a:

a)

Data Type

b)

Variable

c)

Parameter

d)

Library

7.

What concept is being used in this code block?

int n = 1;

while (n < 11) {

Console.WriteLine("Value of n is: " + n);

n++;

}

a)

Conditional (Selection) Statement

b)

Event Based Programming

c)

Loop (Repetition) Statement

d)

Object Statement

8.

Identify the coding concept in bold:


Console.WriteLine("Coding is Fun!");

a)

Method

b)

Object

c)

Class

d)

Parameter

9.

Which coding concept is being applied below?


age = 14;

if (age == "14") {

Console.WriteLine("Heya twin!");

}

else {

Console.WriteLine("I guess we're not twins then!");

}

a)

Loop (Repetition) Statement

b)

Event Based Programming

c)

Conditional Statement

d)

Parameter

10.

A sequence is:

a)

a way to pass values to a method

b)

A blueprint for how an object should behave

c)

A way to check if a condition is true or false

d)

simple steps which are executed in order, one after the other

11.

What types of values can a boolean variable hold?

a)

Any series of characters

b)

Only a single character

c)

Whole numbers

d)

True or False

12.

What type of values can a variable declared with a data type of char hold?

a)

Any number of characters

b)

True or False

c)

Only a single character

d)

Whole Numbers

13.

What data type is returned from the Conolse.ReadLine() method?

a)

char

b)

string

c)

int

d)

boolean

14.

What data type should you assign to a variable you wish to store a series of characters or words, such as names or descriptions?

a)

int

b)

string

c)

array

d)

boolean

15.

What data type would you assign to a variable that will store a single character?

a)

double

b)

float

c)

int

d)

char

16.

What data type would you declare a variable as to store whole numbers?

a)

boolean

b)

char

c)

string

d)

int