esc 201 Quiz 1 Name
k e..~
Please write the answer for each multiple choice in the blank to the left of the question. (2 points
eachffotal22 points).
c 1. The keyword
in a method header specifies that it does not return any
information when it completes its task.
a) static
b) private
c) void
d) using
_15
__2. Every computer can be divided into 6 basic units. They are:
a) Monitor, Mouse, Keyboard, Hard Drive, Processor, and Disk Drives.
b) Input, Output, Primary Storage, Secondary Storage, CPU, and ALU.
c) Input, Output, Memory, ALU, CPU, and Secondary Storage.
d) Input, Output, Primary Storage, Secondary Storage, CPU, Memory.
3. A house is to a blueprint as a(n) _ _ _ is to a class. a) property b) object c) method d) directi ve 'j) 4. The format specifier _ _ _ _ is used to display values in a monetary format.
a) {l}
b) rn
c) \rn
d) C
J) 5. The purpose of the ALU is: a) to store permanent data. b) to store temporary data. c) to cool the computer down and prevent overheating. d) to perform basic math and comparisons for the computer. ~6. The order of simplicity to a human of the three basic types of computer languages is:
(easiest to hardest)
a) High-Level, Assembly, Machine
b) Assembly, Machine, High-Level
c) Machine, High-Level, Assembly
d) Machine, Assembly, High-Level
c
A
7. The arithmetic operators with the same precedence as multiplication are
a) division and parenthesis b) addition and subtraction c) division and remainder d) None of the above. 8. The entry point of a C# program is the _ _ _ method. a) Main b) Start c) Open d) None of the above. ~9. What do the following lines print?
Console. write( "Welcome to " );
Console. Wri teLine( "C# Programming!" );
a) Welcome to
C# Programming! b) Welcome to C# Programming! c) Welcome to C# Programming! d) Welcome to C# Programming! --B--1O. What value will the variable x have at end of the following code if
run in a program? intx=10; x = x*2; x = x%3; a) 10 b) 2 c) 6 d) 20 11. Which method would convert a string into an int? a) string_variable.ConvertTolnt b) Convert.Tolnt32 c) Type.ConvertTolnt d) All of the above the sequence is
Programming Exercise (8 points)
Given the code on the next sheet to start with, write additional code so the program
prompts the user for their first name and age. If they are over 50, write to the console:
Your are a sage (Insert First Name Here), full of knowledge and wisdom for younger generations. If the person is under 50, write to the console:
I must find a sage so they can bequeath their knowledge and wisdom to me!
Pledge (write in full) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Signed _ _ _ _ _ _ __
using System;
using System.Collections.Generic;
using System. Text;
namespace Sages
{
class Pr ogram
{
static void Main(string[] args)
{
F\~t(j""M-e..~ Aae, ~ C(){\~O\f,W~'
r-\\~1Mto\<- ~
(\'P\~CI
. 'I).
)
~
Conso\e. , ~ ~It\.t..() ~ C<.M~...,\t ,W il k C-no(~
A~ e. :
, :T .
e.,-\t y
I'\..w, yOIA r
e·, 1/).) CI!Mv't~. \"0 1""' 3~ \,CvP.~1 ~. ~ cl \t'M.l ) ) )"
Cc
-e\<=:Jl
~~i)k. W \\~\\~ C\\I v"\wrT ~~~ Ot
\... \c.,,~Ju.~
Sa,32-
~o ~~
(lAd. WIJ
LDI,V\
k to
~l"~'+h.
~
me \ ")
© Copyright 2026 Paperzz