WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL PREP EXAM, Exams of Programming Languages

WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL PREP EXAM WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL PREP EXAM WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL PREP EXAM WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL PREP EXAM

Typology: Exams

2025/2026

Available from 01/15/2026

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

310 documents

1 / 146

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1g/g38
WGU
C173
SCRIPTING
AND
PROGRAMMING
FOUNDATIONS
FINAL
PREP
EXAM
1. Whichgoperatorgshouldgbegusedgtogdeterminegifgagnumbergisgevenlygdivisiblegb
yg5?
Ag+
Bg-
Cg*
Dg%:g%
2. Agcargdroveg200gmilesgusingg10ggallonsgofgfuel.
Whichgoperationgshouldgbegusedgtogcomputegthegmilesgperggallon,gwhichgisg20?
AgAddition
B
g
Subtraction
CgMultiplication
DgDivision:gDivision
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
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

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

1 g/g 38

WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS

FINAL PREP EXAM

  1. Whichgoperatorgshouldgbegusedgtogdeterminegifgagnumbergisgevenlygdivisiblegb yg5? Ag+ Bg- Cg* Dg%:g%
  2. Agcargdroveg 200 gmilesgusingg 10 ggallonsgofgfuel. Whichgoperationgshouldgbegusedgtogcomputegthegmilesgperggallon,gwhichgisg20? AgAddition Bg Subtraction CgMultiplication DgDivision:gDivision

2 g/g 38

  1. ^^gAgvariablegshouldgholdgagperson'sgheightgingmeters. Whichgdatagtypegshouldgthegvariablegbe? AgInteger BgFloat CgString DgBoolean:gFloat
  2. ^^gAgvariablegshouldgholdgthegnamesgofgallgpastgU.S.gpresidents. Whichgdatagtypegshouldgthegvariablegbe? AgIntegergarray BgFloatgarray CgStringgarray DgBooleangarray:gStringgarray

4 g/g 38 AgConstantgintegergminAge BgVariablegintegergminAge CgConstantgintegerg 35 DgVariablegintegerg35:gConstantgintegergminAge

  1. Givengintegergxg=g 3 gandgintegergyg=g5. Whatgisgthegvaluegofgthegexpressiong(gxg/g2.0)g+gy? Ag5. Bg6. Cg6. 7 g7.5:g6.
  2. Givengfloatgxg=g10.2gandgfloatgyg=g1.0. Whatgisgthegvaluegofgthegexpressiongxg/gyg? Ag0. Bg1. Cg 10
  • 5 g/g
  • Dg10.2:g10.

7 g/g 38

  1. Whichgexpressiongevaluatesgtogtruegonlygwhengthegusergisgwithing 3 gyearsgofg 2 1 gyears,ggivengagvariablegxgcontaininggaguser'sgage? Agxg>=g18)gorg(gxg<=g24) Bg(gxg>=g18)gandg(gxg<=g24)

8 g/g 38 Cg(gxg<g18)gorg(gxg>g24) Dg(gxg<g18)gandg(gxg>g24):g(gxg>=g18)gandg(gxg<=g24)

  1. ^^gWhichgdatagtypegisgusedgforgitemsgthatgaregmeasuredginglength? AgInteger BgFloat CgString DgBoolean:gFloat
  2. ^^gWhichgdatagtypegshouldgbegusedgtogkeepgtrackgofghowgmanygplanesgareging aghangar? AgInteger Bg Float CgString DgBoolean:gInteger
  3. Agfunctiongshouldgconvertghoursgandgminutesgtogseconds,gsuchgasgconvert- gingg 1 ghourgandg 10 gminutesgtog4,200gseconds. Whatgshouldgbegtheginputgtogthegfunction? AgHoursgonly

10 g/ g 38 CgHoursgandgminutes DgHours,gminutes,gandgseconds:gHoursgandgminutes

  1. Agfunctiongreturnsgagnumbergxgcubed.gForgexample,gifgxgisg3,gthegfunctiongret urnsg 3 gg 3 gg3,gorg27. Whatgshouldgbegtheginputgtogthegfunction? Agx Bgx,gx Cgx,gx,gx Dg27:gx
  2. Agfunctiongcalculatesgthegweightgdifferenceg(Diff)ggivengtwogsamplegweightsg (S1gandgS2). Whatgshouldgbegthegoutputgfromgthegfunction? AgS1gonly BgS2gonly CgS1gandgS DgDiff:gDiff
  3. functiongP(integergx)greturnsgintegergy

11 g/ g 38 yg=g 2 g*gx

13 g/ g 38

  1. AgfunctiongMyFctghasganginputgxgandgangoutputgz. WhatgdoesgMyFctgreturn? AgNothing Bgxgonly Cgzgonly Dgxgandgz:gzgonly
  2. Whatgisgthegreturngvaluegofgagfunction? AgOutputgofgagfunction BgCallgtogrungthegfunction CgDatagpassedgtogthegfunction DgVariablegingthegdeclarationgofgthegfunction:gOutputgofgagfunction
  3. Agprogramgshouldgcontinuegacceptingginputgnumbers,gaddinggeachgtogags um,guntilgag 0 gisginput. Whichgcontrolgstructuregshouldgbegused? AgIfgstatement BgForgloop

14 g/ g 38 CgMultiplegifgstatements

16 g/ g 38

  1. Joegisgbuildinggangonlineggame.gHegwantsgtogprovidegagriddlegandghave thegplayergguessgtheganswer.gTheggamegneedsgtogpromptgthegusergtogentergthegan swer,gcheckgtogseegifgitgtheginputgprovidedgdoesgnotgmatchgthegcorrectganswer,gan dgcontinuegpromptinggtheguserguntilgtheganswergenteredgmatchesgthegcorrectgan swer. WhichgcontrolgstructuregsupportsgJoe'sgneeds? AgForgloop BgWhilegloop CgDo-whilegloop DgIf-elsegbranch:gDo-whilegloop
  2. Whatgisgputgtogoutputgbygthegfollowinggpseudocode? xg=g 3 gd o PutgxgtogoutputgP utg"g"gtogoutputgxg =gxg-g 1

17 g/ g 38 whilegxg>g 0

19 g/ g 38 Putgigtogoutput

20 g/ g 38 ig=gig+g 1 Agi Bgi<20g/> Cgig=g 0 Dgig=gig+g1:gi<20g/>

  1. Whatgisgthegloopgvariableginitializationgingthegfollowinggpseudocode? yg=g 0 sg=g100. whilegyg<g 10 sg=gsg+g(sgg5.0)gy g=gyg+g 1 Agyg=g 0 Bgyg=g yg+g 1 Cgsg=g100. Dgsg=gsg+g(gsgg5.0):gyg=g 0
  2. Ordergthegstepsgneededgtogoutputgthegminimumgofgxgandgygfromgfirstg(1)gtog las