Sie sind auf Seite 1von 14

Programming Right From the Start with Visual Basic.

NET

CHAPTER 1 Input, Process, Output


True-False Questions
1. Computer programs problems are used to sol e problems. Answer: True Level: Easy Section: 1-1 Page: 4 Programs are di ided into two parts" #algorithms and $logic. Answer: False Level: Moderate Section: 1-1 Page: 4 # programming language is an e&ample o' the s(nta& used to create a solution to a problem. Answer: True Level: Easy Section: 1-1 Page: 4 #n algorithm is li*e a recipe used in coo*ing. Answer: True Section: 1-1 Level: Moderate Page: 4

!.

%.

).

+.

#n in'ormation s(stem re'ers to all o' the computers used to collect data 'or an organi,ation. Answer: False Level: Hard Section: 1-1 Page: 4 #ll use'ul in'ormation s(stems ha e two parts" .nput and /utput. Answer: False Level: Moderate Section: 1-1 Page: 5 Processing is an essential part o' an( in'ormation s(stem. Answer: True Level: Easy Section: 1-1 Page: 5 # 'low chart is a graphical representation o' a program2s logic. Answer: True Level: Easy Section: 1-1 Page: 4 #ll programs ha e a beginning and an end. Answer: True Section: 1-2 The 'lowchart s(mbol 'or /utput is a rectangle. Answer: False Section: 1-2 Level: Easy Page: 5

-.

0.

1.

31.

14.

Level: Easy Page: 6

31 - 1

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

11.

The 'lowchart s(mbol 'or .nput is a parallelogram. Answer: True Section: 1-

Level: Easy Page: &

1!.

The ampersand s(mbol 567 is used to lin* together ariables and te&t. Answer: False Level: Moderate Section: 1Page: ' #n input statement will sometimes store data in a ariable. Answer: False Level: Easy Section: 1Page: ' The name o' a ariable is constant. Answer: True Section: 1Level: Easy Page: '

1%.

1).

1+.

# ariable has two parts8 a name and the data alue8 both o' which can change while the program is running. Answer: False Level: Easy Section: 1Page: ' String data and numeric data are the same and can be input into the program the same wa(. Answer: False Level: Hard Section: 1Page: ' Numeric data can not include s(mbols such as the percent sign or commas. Answer: True Level: Easy Section: 1Page: ' Because a ariable can ha e an( name8 9Sue2 is an acceptable name 'or a ariable. Answer: False Level: Moderate Section: 1-4 Page: ( .n Visual $ogic the ariable 9Name2 is the same as the ariable 9N#:E2. Answer: True Level: Moderate Section: 1-4 Page: ( #ssignment statements are used to process data. Answer: True Section: 1-5 Level: Moderate Page: (

1-.

10.

11.

13.

!4.

!1.

The 'lowchart element 'or an assignment statement is a triangle. Answer: False Level: Easy Section: 1-5 Page: 1) The assignment statement has two parts" an e&pression and a ariable. Answer: True Level: Easy

!!.

31-2

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

Section: 1-5 !%.

Page: (

The e&pression part o' the assignment statement goes on the le't hand side. Answer: False Level: Moderate Section: 1-5 Page: ( The ariable side o' the assignment statement is processed last. Answer: True Level: Moderate Section: 1-5 Page: ( The e&pression part o' the assignment statement does not ha e to be a mathematical 'ormula. Answer: True Level: Moderate Section: 1-5 Page: ( The elements o' an assignment statement are processed in order 'rom le't to right. Answer: False Level: Hard Section: 1-5 Page: ( #ll mathematical operations are processed in the order o' le't to right as the( appear in the e;uation. Answer: False Level: Easy Section: 1-5 Page: 1) The programmer can change the operator precedence b( using parentheses. Answer: True Level: Moderate Section: 1-5 Page: 1) The E&ponentiation /peration has the highest precedence. Answer: True Level: Easy Section: 1-5 Page: 1) The operations o' <i ision and .nteger <i ision ha e the same precedence. Answer: False Level: Moderate Section: 1-5 Page: 1) .nteger di ision and integer remainder are unusual mathematical operations that onl( ha e use in speciali,ed situations. Answer: False Level: Moderate Section: 1-5 Page: 11 T(pes o' output can include sending data to the screen8 a printer8 or a 'lopp( dis*. Answer: True Level: Easy Section: 1-6 Page: 12 # literal string is te&t enclosed b( either single ;uotes or double ;uotes. Answer: False Level: Moderate Section: 1-6 Page: 12 The 'lowchart s(mbols 'or .nput and /utput statements are identical.

!).

!+.

!-.

!0.

!1.

!3.

%4.

%1.

%!.

%%.

%).

31-3

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

Answer: False Section: 1-6 %+.

Level: Easy Page: 12

FormatPercent57 is an e&ample o' an intrinsic 'unction. Answer: True Level: Easy Section: 1-6 Page: 1 Currenc(Format57 is not an e&ample o' an intrinsic 'unction. Answer: True Level: Moderate Section: 1-6 Page: 1 #n output statement can onl( contain literal strings or ariables. Answer: False Level: Moderate Section: 1-6 Page: 1 Concatenation is the term used to describe the process o' =oining literal strings8 ariables8 and e&pressions. Answer: True Level: Easy Section: 1-6 Page: 14 The Step / er and Step .nto options are used to run one command at a time. Answer: True Level: Easy Section: 1-' Page: 14 Visual $ogic allows the programmer to debug the program b( e&amining ariables in the Variable >atch window. Answer: True Level: Moderate Section: 1-' Page: 14

%-.

%0.

%1.

%3.

)4.

31-4

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

Multiple Choice Questions


3)1. # computer program" a.7 is a solution to a problem. b.7 has an algorithm component. c.7 has a s(nta& component . d.7 has both b and c. e.7 has a#ll o' the abo e. Answer: e Section:1-1 14)!. #n algorithm is the" a.7 logical design o' a computer program. b.7 s(nta& design o' a computer program. c.7 ph(sical design o' a computer program. d.7 language used to write a computer program. e.7 same as an in'ormation s(stem. Answer: a Section: 1-1 11)%. Level: Moderate Page: 4 Level: Easy Page: 4

>hich is the correct se;uence o' steps in an in'ormation s(stem? a.7 <ata *nowledge wisdom in'ormation. b.7 @nowledge wisdom in'ormation data. c.7 .n'ormation data wisdom *nowledge. d.7 <ata in'ormation *nowledge wisdom. e.7 .n'ormation data *nowledge wisdom. a.7 b.7 c.7 d.7 e.7 Answer: d Section: 1-1 Level: Hard Page: 5

1!)).

S(nta& re'ers to the" . a.7 logical design o' a computer program. b.7 language used to create a computer program. c.7 the graphical representation o' a computer program. d.7 'lowchart o' a computer program. e.7 None o' the abo e. a.7 b.7 c.7 d.7

31-5

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

e.7 Answer: * Section: 1-1 1%)+. Level: Easy Page: 4

>hich is not a primar( component o' an in'ormation s(stem? a.7 i.nput b.7 o/utput c.7 d<ebugging d.7 prProcessing e.7 #ll are primar( components.are primar( components. a.7 b.7 c.7 d.7 e.7 Answer: c Section: 1-1

Level: Moderate Page: 5

)-.

>hich s(mbol in a 'lowchart represents .nput? a.7 pParallelogram b.7 rRectangle c.7 d<iamond d.7 hAe&agon e.7 sS;uare Answer: a Section: 1-2 Level: Easy Page: 6

)0.

>hich s(mbol in a 'lowchart represents /utput? a.7 pParallelogram b.7 rRectangle c.7 d<iamond d.7 hAe&agon e.7 S;s;uare Answer: a Section: 1-2 Level: Easy Page: 6

)1.

>hich s(mbol in a 'lowchart represents an assignment statement? a.7 pParallelogram b.7 rRectangle c.7 d<iamond d.7 hAe&agon e.7 sS;uare Answer: * Level: Easy

31-6

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

Section: 1-2 )3. #n ampersand is used to" a.7 add together numbers. b.7 represent a carriage return. c.7 represent a line 'eed. d.7 concatenate string items. e.7 signal the end o' the program. Answer: d Section: 1+4. >hich is true about a ariable? a.7 The name and data alue can both change. b.7 The name can change8 but the data alue can not. c.7 The name can not change8 but the data alue can. d.7 The name and the data alue both can not change. e.7 # ariable does not ha e a data alue. Answer: c Section: 1-

Page: 6

Level: Moderate Page: '

Level: Moderate Page: '

+1.

>hich s(mbol can sometimes be used when using numeric input? a.7 pPercent 5B7 b.7 d<ecimal 5.7 c.7 d<ollar 5C7 d.7 cComma 587 e.7 #ll can be used with numeric input.o' the abo e. Answer: * Section: 1Level: Easy Page: &

+!.

>hich statement ta*es data 'rom a user and stores it in a ariable? a.7 i.nput b.7 a#ssignment c.7 o/utput d.7 i.nput and output e.7 a#ll o' the abo e. Answer: a Section: 1Level: Easy Page: '

+%.

>hich statement ta*es string literals8 ariables8 and e&pressions and displa(s the data on a screen or printer? a.7 i.nput b.7 a#ssignment c.7 o/utput d.7 i.nput and output e.7 a#ll o' the abo e. Answer: c Level: Easy

31-7

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

Section: 1-6 +).

Page: 12

>hich statement per'orms mathematical operations on data and stores the result in a ariable? a.7 i.nput b.7 a#ssignment c.7 o/utput d.7 i.nput and output e.7 a#ll o' the abo e. Answer: * Section: 1-5 Level: Easy Page: 1)

++.

>hich is not a rule 'or naming ariables? a.7 Dse a descripti e name 'or the ariable. b.7 Start the name o' a ariable with a letter. c.7 Dse nothing but letters8 digits8 or the underscore character. d.7 <o not use a reser ed programming language word as a ariable. e.7 #ll o' the abo e are appropriate rules 'or naming ariables. Answer: e Level: Moderate Section: 1-4 Page: ( #n assignment statement will" a.7 per'orm a calculation. b.7 store the results o' a calculation. c.7 displa( the results o' a calculation. d.7 Both a and b. e.7 #ll o' the abo e. Answer: c Section: 1-5 Level: Moderate Page: (

+-.

+0.

The correct order o' operator precedence8 'rom highest to lowest8 is" a.7 #addition8 .integer <di ision8 Ee&ponentiation8 :multiplication. b.7 #addition8 Ee&ponentiation8 .integer <di ision8 :multiplication. c.7 Ee&ponentiation8 .integer <di ision8 :multiplication8 #addition. d.7 Ee&ponentiation8 :multiplication8 .integer <di ision8 #addition. e.7 Ee&ponentiation8 :multiplication8 #addition8 .integer <di ision. Answer: d Section: 1-5 Level: Hard Page: 1)

+1.

>hat is the correct result o' the e;uation" ! E ! F %? a.7 1.%% b.7 1 c.7 1! d.7 -) e.7 1Answer: e Section: 1-5 Level: Moderate Page: 1)

31-8

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

+3.

>hat is the correct result o' the e;uation" ! G % E )? a.7 + b.7 14 c.7 1! d.7 1) e.7 !4 Answer: d Section: 1-5 Level: Moderate Page: 1)

-4.

The term :/< is used 'or" a.7 e&ponentiation. b.7 multiplication. c.7 di ision. d.7 integer di ision. e.7 integer remainder. Answer: e Section: 1-5 Level: Moderate Page: 1)

-1.

>hich is not considered a 'orm o' output? a.7 Dsing a printer. b.7 Sa ing to a 'lopp( dis*. c.7 Sa ing to a hard dri e. d.7 <ispla(ing on a screen. e.7 #ll o' the abo e are e&amples o' output. Answer: e Section: 1-6 Level: Easy Page: 12

-!.

Aow is a string literal created? a.7 Dsing the ampersand s(mbol. b.7 Dsing an intrinsic 'unction. c.7 Dsing single ;uotes. d.7 Dsing double ;uotes. e.7 #ll o' the abo e. will create a string literal. Answer: d Section: 1-6 Level: Moderate Page: 12

-%. >hat do we call ais a prede'ined command that adds 'unctionalit( to the programming language called? a.7 an a#lgorithm b.7 pPseudocode c.7 a Variable d.7 an i.ntrinsic 'unction e.7 a w>atch window Answer: d Level: Hard

31-9

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

Section: 1-6 -). >hich is not an e&ample o' an intrinsic 'unction? a.7 FormatCurrenc( b.7 FormatPercent c.7 Format<ollar d.7 Round e.7 Random Answer: c Section: 1-6 -+. # a.7 b.7 c.7 d.7 e.7 ariable watch window will appear when" the program is being created. the program is running. the program is paused. bBoth b and c. a#ll o' the abo e.

Page: 14 .

Level: Hard Page: 1

Answer: c Section: 1-'

Level: Hard Page: 14

3 1 - 10

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

Fill in the Blank Questions


1)--. # 'lowchart represents the HHHlogicalHHHH design o' a program. Level: Easy Section: 1-1 Page: 4 Pseudocode is one method 'or representing a5n7 HHHHalgorithmHHHHH. Level: Moderate Section: 1-1 Page: 4 HHHS(nta&HHHH is the rules o' a programming language. Level: Easy Section: 1-1 Page: 4 #ll HHHin'ormation s(stems Level: Easy Section: 1-1 will input8 process8 and output data. Page: 5

-01+.

-11-.

-310.

0411.

The input statement is represented b( a5n7 HHHparallellogramHHH. Level: Easy Section: 1-1 Page: 6 The HHHassignmentHHH statement is represented b( a rectangle. Level: Easy Section: 1-2 Page: 6 #5n7 HHH ariableHHH is used b( the program as a store location 'or data. Level: Easy Section: 1Page: ' The HHHinputHHH statement gets data 'rom the user. Level: Easy Section: 1-

0113.

0!!4.

0%.

Page: 7

0).

The HHHampersandHHH is used to concatenate string literals and ariables. Level: Moderate Section: 1Page: ' <ouble ;uotes are used to indicate HHHstringHHH data. Level: Easy Section: 1-6

0+.

Page: 12'

0-.

HHHNumericHHH data is entered as digits 5sometimes with one decimal7. Level: Easy Section: 1Page: & .nput statements are used to put HHHdataHHH into ariables. Level: Moderate Section: 1Page: &

00.

3 1 - 11

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

01.

The name o' a ariable should HHHdescribeHH the t(pe o' data being held b( the ariable. Level: Moderate Section: 1Page: ( The name o' a ariable must start with a5n7 HHHletterHHH. Level: Easy Section: 1Page: ( The HHHassignmentHHH statement processes data and stores the result in a ariable. Level: Easy Section: 1-5 Page: ( The HHe&pressionHHH is 'ound on the right hand side o' an assignment statement. Level: Moderate Section: 1-5 Page: ( The HH ariableHHH is 'ound on the le't hand side o' an assignment statement. Level: Moderate Section: 1-5 Page: (

03.

14.

11.

1!.

1%.

Dsing HHHparenthesesHHH will o erride the operator precedence 'or mathematical operations. Level: Hard Section: 1-5 Page: 1) The operation with the lowest order o' precedence is HHHadditionIsubtractionHHH. Level: Moderate Section: 1-5 Page: 1) Te&t 'ound inside o' double ;uotation mar*s is called a5n7 HHHstring literalHHH. Level: Moderate Section: 1-6 Page: 12 HHH.ntrinsicHH 'unctions are commands pac*aged with the programming language 8 which pro ide help'ul 'unctionalit( such as math operations8 con ersion 'unctions8 'ile access8 etc. Level: Moderate Section: 1-6 Page: 1 Sa ing data to a hard dri e is considered a5n7 HHHoutputHHH operation. Level: Easy Section: 1-6 Page: 12 The ampersand is used to HHHconcatenateHHH string literals8 ariables8 and e&pressions in output statements. Level: Easy Section: 1-6 Page: 14

1).

1+.

1-.

10.

11.

3 1 - 12

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

13.

# bug is another name 'or a programming HHHerrorHHH. Level: Easy Section: 1-' Page: 14 The HHHSstep o/ erHHH option will e&ecute the ne&t command at the same le el as the current command. Level: Hard Section: 1-' Page: 14

34.

3 1 - 13

Chapter 1 ! "epeat#n$ %ct#onsInput Process Output

Essay Questions
!131. E&plain the terms #algorithm and Ss(nta&. Aow are the( related? %n #algorithm represents the lo$#cal des#$n o+ a solut#on used to sol,e a pro*le-. It can *e represented #n -any +or-s #nclud#n$ a +lo/chart or pseudocode. The Ss(nta& represents the spec#+#c pro$ra--#n$ lan$ua$e and assoc#ated rules used to create or #-ple-ent the lo$#cal des#$n o+ the al$or#th-. E,ery pro$ra--#n$ lan$ua$e has #ts o/n un#0ue synta1 /h#chthat -ust *e +ollo/ed. The al$or#th- and synta1 to$ether are used to create a co-puter pro$ra- that /#ll sol,e the pro*le- #n 0uest#on. 2s#n$ synta1 to /r#t#n$e a pro$ra- /#thout an al$or#th- as a $u#de can lead to a co-puter pro$ra- that does not sol,e the pro*le-.

3!!.

>hat is an .n'ormation S(stem? %n .n'ormation S(stem #s used to collect, process, and output the data o+ an or$an#3at#on or #nd#,#dual. It #ncludes *oth the people /ho des#$n, create, and -a#nta#n the syste- as /ell as the co-puters and other technolo$#es that are used to #-ple-ent the syste-. %ll #n+or-at#on syste-s /#ll acco-pl#sh three +unda-ental tas4s5 Input5 collect and $ather data Process5 or$an#3e and -an#pulate data to create #n+or-at#on and 4no/led$e Output5 d#splay #n+or-at#on on screens 6and pr#nted reports, store #n+or-at#on +or later retr#e,al

3 1 - 14

Das könnte Ihnen auch gefallen