Font size
WorksheetsRevision for Quiz #1
Total questions: 16
Worksheet time: 8mins
In programming, syntax is
a set of rules that determine the order symbols and characters have to go in, to create a correct programming document.
an instruction to repeat a series of statements
A way to store information to be used later by the programmer
A way to check a condition and take different paths depending upon that condition
Identify the concept in bold:
Console.WriteLine("Hello World");
Method
Parameter
Class
String
using System;
What does the line above do in a C# program?
Ensures we are using the correct type of computer
Imports the System library which contains code we can use in our programs
Ensures the program is run in the repl.it environment
Let's the computer know we are running a C# program
string name = "John";
In the code above, "John" is a:
String
Library
Parameter
Data Type
string name = "John";
In the line above string is a:
String
Variable
Data Type
Parameter
string name = "John";
In the line above name is a:
Data Type
Variable
Parameter
Library
What concept is being used in this code block?
int n = 1;
while (n < 11) {
Console.WriteLine("Value of n is: " + n);
n++;
}
Conditional (Selection) Statement
Event Based Programming
Loop (Repetition) Statement
Object Statement
Identify the coding concept in bold:
Console.WriteLine("Coding is Fun!");
Method
Object
Class
Parameter
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!");
}
Loop (Repetition) Statement
Event Based Programming
Conditional Statement
Parameter
A sequence is:
a way to pass values to a method
A blueprint for how an object should behave
A way to check if a condition is true or false
simple steps which are executed in order, one after the other
What types of values can a boolean variable hold?
Any series of characters
Only a single character
Whole numbers
True or False
What type of values can a variable declared with a data type of char hold?
Any number of characters
True or False
Only a single character
Whole Numbers
What data type is returned from the Conolse.ReadLine() method?
char
string
int
boolean
What data type should you assign to a variable you wish to store a series of characters or words, such as names or descriptions?
int
string
array
boolean
What data type would you assign to a variable that will store a single character?
double
float
int
char
What data type would you declare a variable as to store whole numbers?
boolean
char
string
int
