Introduction to Computer Programming Visual Basic – Quiz 2 | CS 0004, Quizzes of Computer Science

Material Type: Quiz; Class: INTRO COMPUTER PROGRMMNG-BASIC; Subject: Computer Science; University: University of Pittsburgh; Term: Unknown 1989;

Typology: Quizzes

Pre 2010

Uploaded on 09/02/2009

koofers-user-gj2
koofers-user-gj2 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to Programming using Visual Basic
CS0004
Pop Quiz 2
Name ________________________ Pitt ID __________________________
Instructions: You have 15 minutes to answer these questions as clearly and precisely as
you can. Good Luck!
1. Name the 6 relational operators we discussed:
2. Name the 3 logical operators used to join relational operators together:
3. Evaluate the following statements (show all work):
a. “Joe” < “joe” And (Not (5 >= 2))
b. ( ( (50 < 100) Or (5 <> 10) ) And “jack” = “Jack”)
4. What is the difference between a Sub Procedure and a Function?
5. Convert these nested If statements into a If-ElseIf-Else statement:
If var1 > var2 Then
… block 1…
Else
If var1 < var3 Then
…block2…
Else
…block3…
End If
End If
6. Convert the following Do While Loop into a For Next Loop
Dim x As Integer = 1
Do While x <= 5
lstOutput.Items.Add(x)
x += 1
Loop

Partial preview of the text

Download Introduction to Computer Programming Visual Basic – Quiz 2 | CS 0004 and more Quizzes Computer Science in PDF only on Docsity!

Introduction to Programming using Visual Basic CS Pop Quiz 2 Name ________________________ Pitt ID __________________________ Instructions : You have 15 minutes to answer these questions as clearly and precisely as you can. Good Luck!

  1. Name the 6 relational operators we discussed:
  2. Name the 3 logical operators used to join relational operators together:
  3. Evaluate the following statements (show all work): a. “Joe” < “joe” And (Not (5 >= 2)) b. ( ( (50 < 100) Or (5 <> 10) ) And “jack” = “Jack”)
  4. What is the difference between a Sub Procedure and a Function?
  5. Convert these nested If statements into a If-ElseIf-Else statement: If var1 > var2 Then … block 1… Else If var1 < var3 Then …block2… Else …block3… End If End If
  6. Convert the following Do While Loop into a For Next Loop Dim x As Integer = 1 Do While x <= 5 lstOutput.Items.Add(x) x += 1 Loop