Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

unit 7 programming quiz

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.
What is class in programming?
a)
Being crazy fancy
b)
programming code template for making objects
c)
Top hats.... just top hats
d)
command to improve loading speeds in debugging
2.
What are members in programming?
a)
where the popular kids are
b)
part of a "club"
c)
Variable associated with a specific object
d)
ooh a green square
3.
What is an object in programming?
a)
a bouncy ball
b)
the correct square is purple minus this square
c)
combination of variables, functions and data structures
d)
a loop for making new lists
4.
What are some examples of math class functions?
a)
+, -, =, *, /
b)
Slice, Fuse, Sort, Refresh
c)
ooh, eeh, ooh, ah, ah
d)
Abs, Sqrt, Sign, Round
5.
Which is a string class function?
a)
CentroidIn()
b)
MemeFor()
c)
IndexOf()
d)
DabOn()
6.
What does Compare() do?
a)
Compares two specified String objects and returns an integerthat indicates their relative position in the sort order
b)
Finds which line of code will debug faster
c)
Determines whether this instance and another specifiedString object have the same value
d)
wow it took years for visual baic to make a better version!
7.
What does the Insert() function do?
a)
adds an infinite loop
b)
Dim strA As String = "Peanut"Dim strB As String = "Butter"If String.Compare(strA, strB) = 0 ThenlblAnswer.Text = strA & " is equal to " & strBElseIf String.Compare(strA, strB) < 0 ThenlblAnswer.Text = strA & " comes before " & strBElseIf String.Compare(strA, strB) > 0 ThenlblAnswer.Text = strA & " comes after " & strB
c)
Inserts a specified instance of String at a specified indexposition in this instance
d)
abble baaa
8.
what does   Dim strA As String = "Apple"Dim strB As String = "apple"If strA.Equals(strB) Then  lblAnswer.Text = "The strings are the same."Else  lblAnswer.Text = "The strings are the different."End If do?
a)
ummmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
b)
"The strings are the same."
c)
what.... is this even
d)
"The strings are the different."
9.
What does the Concat() function do?
a)
concatenate
b)
separate questions
c)
dogerite
d)
follows a laser pointer
10.
What does Remove() do?
a)
google it
b)
The Remove() function has several differentvariations that will return the index position of acharacter or string.
c)
returns a new string where the specified string has been deleted.
d)
ask your phone
11.
what is this?
Private Sub btnEquals_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesbtnEquals.Click
Dim strA As String = Me.txtWord1.Text
Dim strB As String = Me.txtWord2.Text
If strA.Equals(strB) Then
lblAnswer.Text = "The strings are the same." Else
lblAnswer.Text = "The strings are the different." End If End Sub
Private Sub btnReplace_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesbtnReplace.Click Dim strA As String = Me.txtWord1.Text Dim strB As String = Me.txtWord2.Text Dim strNew, strNew2 As String
strNew = strA.Replace(strB, "b")
lblAnswer.Text = strNew & " " & strNew2 End Sub
Private Sub btnIndexOf_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnIndexOf.Click
Dim strA As String = Me.txtWord1.Text
Dim strB As String = Me.txtWord2.Text
Dim intIndex As Integer
intIndex = strA.IndexOf(strB)
lblAnswer.Text = intIndex End Sub
Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInsert.Click
Dim strA As String = Me.txtWord1.Text
Dim strB As String = Me.txtWord2.Text
Dim strNew As String
strNew = strA.Insert(5, "s")
lblAnswer.Text = strNew End Sub
Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesbtnRemove.Click
Dim strA As String = Me.txtWord1.Text
Dim strB As String = Me.txtWord2.Text
Dim strNew, strNew2 As String
strNew = strA.Remove(0)
strNew2 = strB.Remove(0, 1)
lblAnswer.Text = strNew2 & " " & strNew End Sub
a)
click the blue square now!
b)
I dont even know
c)
code
d)
17
12.
What does Trim() do?
a)
shortens your debuger
b)
deletes all other variables
c)
Removes all leading and trailing white-space charactersfrom the current String object
d)
dab
13.
What does ToLower() do?
a)
Returns a copy of this string converted to lowercase
b)
moves code down a line
c)
makes this code run after ToUpper() no matter its location
d)
moves the case up
14.
What does the length property do?
a)
allows you to add an extra property
b)
raises your char limit by a specified value
c)
measures the land you own
d)
Finds the length of any string
15.
What does the Chars property do?
a)
changes code from object based to a binary setup
b)
Gets any character that is part of the string 
c)
odds are you will click this one as its the longest and has complex sounding stuff like "entanglement loops"
d)
"burns" your code