Solved Quiz 1 - Introduction to Computer Programming with Visual Basic | 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-1qy
koofers-user-1qy 🇺🇸

9 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 1 - Solution
Name ________________________ Pitt ID __________________________
Instructions: You have 15 minutes to answer these questions as clearly and precisely as
you can. Good Luck!
1. Name 2 of the 4 main parts of the typical computer:
Two of the following: Processor, Memory, Hard Drive, I/O Devices
2. What makes Visual Basic different than other programming languages?
Visual Basic is user driven (or event driven).
3. When programming at what step will you spend the most amount of time?
Debugging and Testing.
4. Provide 2 examples of an I/O Device:
Possible examples: Monitor, Keyboard, Mice, Game Controllers, Printer, etc.
5. Evaluate the following expressions:
a. (10 + 10) / 2
10
b. 10 + 10 / 2
15
c. 21 mod 2
1
d. 2^2
4
6. What would be the value of x and y after executing this code?
Dim x as Integer
Dim y as String
x = 3
y = “my_test”
x = x + y.Length
y = y & “_again”
x is 10, because x was 3 and the length of y is 7 so 3 + 7 = 10
y is the string “my_test_again”, y was the string “my_test” then it was set to
y concatenated with “_again”, making the string “my_test_again”

Partial preview of the text

Download Solved Quiz 1 - Introduction to Computer Programming with Visual Basic | CS 0004 and more Quizzes Computer Science in PDF only on Docsity!

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

  1. Name 2 of the 4 main parts of the typical computer: Two of the following: Processor, Memory, Hard Drive, I/O Devices
  2. What makes Visual Basic different than other programming languages? Visual Basic is user driven (or event driven).
  3. When programming at what step will you spend the most amount of time? Debugging and Testing.
  4. Provide 2 examples of an I/O Device: Possible examples: Monitor, Keyboard, Mice, Game Controllers, Printer, etc.
  5. Evaluate the following expressions: a. (10 + 10) / 2 10 b. 10 + 10 / 2 15 c. 21 mod 2 1 d. 2^ 4
  6. What would be the value of x and y after executing this code? Dim x as Integer Dim y as String x = 3 y = “my_test” x = x + y.Length y = y & “_again” x is 10, because x was 3 and the length of y is 7 so 3 + 7 = 10 y is the string “my_test_again”, y was the string “my_test” then it was set to y concatenated with “_again”, making the string “my_test_again”