WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS OBJECTIVE ASSESSMENT QUESTIONS AND FINAL, Exams of Programming Languages

WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS OBJECTIVE ASSESSMENT QUESTIONS AND FINAL EXAM REVIEW AT THE END WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS OBJECTIVE ASSESSMENT QUESTIONS AND FINAL EXAM REVIEW AT THE END WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS OBJECTIVE ASSESSMENT QUESTIONS AND FINAL EXAM REVIEW AT THE END WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS OBJECTIVE ASSESSMENT QUESTIONS AND FINAL EXAM REVIEW AT THE END

Typology: Exams

2025/2026

Available from 01/15/2026

richard-brown-3
richard-brown-3 🇺🇸

310 documents

1 / 48

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1g/g18
WGU C173 SCRIPTING AND PROGRAMMING FOUNDATIONS
OBJECTIVE ASSESSMENT QUESTIONS AND
FINAL
EXAM
REVIEW
AT
THE
END
1. Whichgoperatorgshouldgbegusedgtogdeterminegifgagnumbergisgevenlygdivisiblegb
yg5?
Ag+
Bg-
Cg*
Dg%:gD
2. Agcargdroveg200gmilesgusingg10ggallonsgofgfuel.
Whichgoperationgshouldgbegusedgtogcomputegthegmilesgperggallon,gwhichgisg20?
AgAddition
B
g
Subtraction
CgMultiplication
DgDivision:gD
3. Agvariablegshouldgholdgagperson'sgheightgingmeters.
Whichgdatagtypegshouldgthegvariablegbe?
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30

Partial preview of the text

Download WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS OBJECTIVE ASSESSMENT QUESTIONS AND FINAL and more Exams Programming Languages in PDF only on Docsity!

1 g/g 18

WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS

OBJECTIVE ASSESSMENT QUESTIONS AND

FINAL EXAM REVIEW AT THE END

  1. Whichgoperatorgshouldgbegusedgtogdeterminegifgagnumbergisgevenlygdivisiblegb yg5? Ag+ Bg- Cg* Dg%:gD
  2. Agcargdroveg 200 gmilesgusingg 10 ggallonsgofgfuel. Whichgoperationgshouldgbegusedgtogcomputegthegmilesgperggallon,gwhichgisg20? AgAddition Bg Subtraction CgMultiplication DgDivision:gD
  3. Agvariablegshouldgholdgagperson'sgheightgingmeters. Whichgdatagtypegshouldgthegvariablegbe?

2 g/g 18 AgInteger BgFloat CgString DgBoolean:Gb

  1. AgvariablegshouldgholdgthegnamesgofgallgpastgU.S.gpresidents. Whichgdatagtypegshouldgthegvariablegbe? AgIntegergarray BgFloatgarray CgStringgarray DgBooleangarray:gC
  2. Agprogramgusesgthegnumbergofgsecondsgingagminutegingvariousgcalculations. Howgshouldgthegitemgthatgholdsgthegnumbergofgsecondsgingagminutegbegde-gclared? AgConstantgfloatguserTime BgVariablegfloatguserTime CgConstantgintegergsecondsPerMinute DgVariablegintegergsecondsPerMinute:gC
  3. Agprogramgdeterminesgifgaguser'sgagegisghighgenoughgtogrungforgU.S.gpresi- gdent.gThegminimumgagegrequirementgisg35. Howgshouldgthegitemgthatgholdsgthegminimumgagegbegdeclared?

4 g/g 18

  1. Whatgisgthegpurposegofgparenthesesg()gingagprogramminggexpression? AgTogprintgexpressions BgToggroupgexpressions CgTogrungexpressions DgTogcomposegexpressions:gB
  2. Givengfloatgxg=g3.0. Whichgexpressiongevaluatesgtog2.0? Agxg/g 3 g*g 2 g+g 2 Bgxg-g2/ Cgxg+g0.5g/ Dgxg/g 2 g+g0.5g/2g+g.25:gD
  3. Whichgexpressiongevaluatesgtogtruegonlygwhengthegusergisgwithing 3 gyearsgofg 2 1 gyears,ggivengagvariablegxgcontaininggaguser'sgage? Agxg>=g18)gorg(gxg<=g24) Bg(gxg>=g18)gandg(gxg<=g24)

5 g/g 18 Cg(gxg<g18)gorg(gxg>g24) Dg(gxg<g18)gandg(gxg>g24):gB

  1. Whichgdatagtypegisgusedgforgitemsgthatgaregmeasuredginglength? AgInteger BgFloat CgString DgBoolean:gB
  2. Whichgdatagtypegshouldgbegusedgtogkeepgtrackgofghowgmanygplanesgaregingagh angar? AgInteger Bg Float CgString DgBoolean:gA
  3. Agfunctiongshouldgconvertghoursgandgminutesgtogseconds,gsuchgasgconvert- gingg 1 ghourgandg 10 gminutesgtog4,200gseconds. Whatgshouldgbegtheginputgtogthegfunction? AgHoursgonly BgMinutesgonly CgHoursgandgminutes DgHours,gminutes,gandgseconds:gC
  4. Agfunctiongreturnsgagnumbergxgcubed.gForgexample,gifgxgisg3,gthegfunctiongret urnsg 3 gg 3 gg3,gorg27. Whatgshouldgbegtheginputgtogthegfunction?

7 g/g 18 WhatgdoesgP(5)gevaluategto? Ag 2 Bg 5 Cg 10 Dg25:gC

  1. Functiong F()g Pu tg"Hey"gtogoutput WhatgentiregoutputgappearsgaftergthreegsuccessivegcallsgtogF()? AgHey BgHHHey CgHeyHeyHey DgHeygHeygHey:gC
  2. Whatgisgagvalidguser-definedgfunctiongname? AgAgreservedgword BgAnygvalidgidentifier CgAnygvariablegname DgAgfloating-pointgnumber:gB
  3. AgfunctiongMyFctghasganginputgxgandgangoutputgz. WhatgdoesgMyFctgreturn? AgNothing Bgxgonly Cgzgonly

8 g/g 18 Dgxgandgz:gC

10 g/ g 18

  1. Joegisgbuildinggangonlineggame.gHegwantsgtogprovidegagriddlegandghave thegplayergguessgtheganswer.gTheggamegneedsgtogpromptgthegusergtogentergthegan swer,gcheckgtogseegifgitgtheginputgprovidedgdoesgnotgmatchgthegcorrectganswer,gan dgcontinuegpromptinggtheguserguntilgtheganswergenteredgmatchesgthegcorrectgan swer. WhichgcontrolgstructuregsupportsgJoe'sgneeds? AgForgloop BgWhilegloop CgDo-whilegloop DgIf-elsegbranch:gC
  2. Whatgisgputgtogoutputgbygthegfollowinggpseudocode? xg=g 3 gd o PutgxgtogoutputgP utg"g"gtogoutputgxg= gxg-g 1 whilegxg>g 0 Ag 3 g 2 g 1 g 0 Bg 3 g 2 g 1 g 0 g- 1 Cg 2 g 1 g 0 Dg 3 g 2 g1:gD
  3. Agprogrammerghasgdevelopedgthegfollowinggcode:

11 g/ g 18 countg=g 0 whilegcountgisglessgthang5: printg'Hello' Whatgisgthegresultgofgimplementinggthisgcode? Ag'Hello'gwillgprintgfourgtimes. Bg'Hello'gwillgprintgfivegtimes. CgThegprogramgwillgthrowgangerror. Dg'Hello'gwillgprintgindefinitely.:gD

  1. Whatgisgthegloopgexpressiongingthegfollowinggpseudocode? ig=g 0 whilegig<g 20 gPut gigtogoutput

13 g/ g 18 DgIfgyg<gmin,gsetgming=gy:gACDB

14 g/ g 18

  1. Ordergthegstepsgneededgtogcalculategspeedgingmilesgperghourggivengagstartgan dgendglocationgandgtimegtraveledginghoursgfromgfirstg(1)gtoglastg(4). Selectgyourganswersgfromgthegpull-downglist. AgPutgspeedMphgtogoutput BgDeclaregvariablesgdistMilesgandgspeedMph CgdistMilesg=gendLocationg-gstartLocation DgspeedMphg=gdistMilesg/gtimeHours:gBCDA
  2. Ordergthegtasksgneededgtogcreategagpyramidg(largegongbottom,gsmallgongtop)go ngagtablegfromgfirstg(1)gtoglastg(4). Selectgyourganswersgfromgthegpull- downglist.gAgPlaceglargestgshape.

16 g/ g 18 ig=g 0 xg=g 0 g while gig<g 5 gifglist[i ]g<g 0 gxg=g 1 ig=gig+g 1 Putgxgtogoutput AgAllgintegersgaregpositive. BgAllgintegersgaregnegative. CgAtgleastgonegintegergisgnegative. DgAtgleastgonegintegergisgpositive.:gC

17 g/ g 18

  1. Whengshouldgagprogrammergdevelopgangalgorithmgtogsolvegagproblem? AgBeforegknowinggthegproblem BgBeforegwritinggagprogramgtogsolvegthegproblem CgWhilegwritinggag programg tog solveg theg problem DgAftergwritinggagprogramgtogsolvegthegproblem:gB
  2. Whichgtextgrepresentsgangalgorithm? AgCatsgandgdogsghavegtails. BgInsertgkey,gturngkey,gopengdoor. CgThegforecastgforgtomorrowgisgrain. DgAgboxghasgballs,gbats,gandghats.:gB
  3. Whichgtextgrepresentsgangalgorithm? AgShakegbulb;gifgitgrattles,greplacegit. BgWatergisgwet;gfiregisgnotgwet. CgStaringgatgthegsunghurtsgthegeyes. DgThegmaxgspeedgisg 60 gmph.:gA
  4. Angalgorithmgshouldgoutputg"OK"gifgaglist'sgnumbersgaregallgnon- zero,gelsegthegoutputgisg"NotgOK." Whichgtestgisgagvalidgtestgofgthegalgorithm? AgInputg0,g0,g0.gEnsuregoutputgisg"OK." BgInputg5,g4,g0.gEnsuregoutputgisg"OK." CgInputg-3,g-2,g5.gEnsuregoutputgisg"NotgOK." DgInputg99,g0,g5.gEnsuregoutputgisg"NotgOK.":gD

19 g/ g 18 AgToogyoung BgOK CgToogold DgNothinggisgputgtogoutput.:gB

  1. Whatgisgputgtogoutputgbygthegfollowinggflowchart,gifgtheginputgisg 3 g 5 g-1? Ag 3 g 5 g- 1 Bg 3 g 5 Cg 6 g 10 Dg 6 g 10 g-2:gC

20 g/ g 18

  1. Whatgisgthegpurposegofgthegfollowinggclassgdiagram? AgShowsghowgthegEmployeegclassgisgusedgingthegprogram BgDescribesgthegexecutiongflowgofgthegEmployeegclass'goperations CgSpecifiesgthegEmployeegclass'gbehavioralgrequirements DgDepictsgthegEmployeegclass'gname,gdatagmembers,gandgfunctions:gD
  2. Whatgisgthegpurposegofgagusegcasegdiagram,gsuchgasgthegfollowinggdiagram? AgDescribesghowgagusergcanginteractgwithgagprogram BgDescribesgthegdatagusedgingthegprogram CgIllustratesgthegflowgofgthegprogram'sgalgorithms DgShowsgtheginteractiongbetweengprogramgcomponents:gA
  3. Whichgelementsgaregcharacteristicgofgagclassgdiagram? AgSystem'sgclasses,gattributes,gandgmethodsgandgtheirgfeatures,gconstraints,gandg relationships BgFlowgofglogicgandgprocessginteractiongwithingagsystem CgPhysicalgresourcesgorglogicalgarchitecturegofgagsystem DgInternalgstructuregofgagclassgandgcollaborationgbetweengclassesgorginstances- :gA
  4. Reviewgthegfollowinggusegcasegdiagram:g Whatgdoesgagusegcasegdiagramgdo? AgDiagramsgagsinglegusegcase BgConnectsgseveralgusegcasesgtogclassgdiagrams CgProvidesgangoverviewgofgseveralgusegcases