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

WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL OBJECTIVE ASSESSMENT EXAM WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL OBJECTIVE ASSESSMENT EXAM WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL OBJECTIVE ASSESSMENT EXAM WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL OBJECTIVE ASSESSMENT EXAM WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS FINAL OBJECTIVE ASSESSMENT EXAM

Typology: Exams

2025/2026

Available from 01/15/2026

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

310 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1g/g10
WGU C173 SCRIPTING AND PROGRAMMING FOUNDATIONS
FINAL OBJECTIVE ASSESSMENT EXAM
1.Whatgisgangeditor
gANSgAgprogramgthatgallowsgyougtogwritegcode
2.Whatgisgagcompiler
gANSgAgprogramgthatgproducesgothergprograms.gThegcompilergdoesgallgthegwor
kgatgoncegandgthengrunsgthegnewgprogram.gWe'regtranslatinggthegcodegwegwrot
egtogcomputergcodegallgatgonce.gThisgisgoftengwhengwegproducegang.exe(execut
able)gfile.
3.Whatgisganginterpreter
gANSgAgprogramgthatgrunsgcodegoneglinegatgagtime.gInsteadgofconvertinggallgof
gthegcodegatgoncegitgrunsgeachglinegasgit'sgneeded.gItginterpretsgthatgspecificgli
negfromgyourgcodegtogcomputergcode.
4.Whatgisgangoperatorgandgwhatgdoesgitgdo
gANSgAngoperatorgtakesgtwogoperandsg(values)gandgdoesgsomethinggwithgthem
.gIt
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

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

1 g/g 10

WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS

FINAL OBJECTIVE ASSESSMENT EXAM

  1. What g is g an g editor gANS gAgprogramgthatgallowsgyougtogwritegcode
  2. What g is g a g compiler gANS gAgprogramgthatgproducesgothergprograms.gThegcompilergdoesgallgthegwor kgatgoncegandgthengrunsgthegnewgprogram.gWe'regtranslatinggthegcodegwegwrot egtogcomputergcodegallgatgonce.gThisgisgoftengwhengwegproducegang.exe(execut able)gfile.
  3. What g is g an g interpreter gANS gAgprogramgthatgrunsgcodegoneglinegatgagtime.gInsteadgofconvertinggallgof gthegcodegatgoncegitgrunsgeachglinegasgit'sgneeded.gItginterpretsgthatgspecificgli negfromgyourgcodegtogcomputergcode.
  4. What g is g an g operator g and g what g does g it g do gANS gAngoperatorgtakesgtwogoperandsg(values)gandgdoesgsomethinggwithgthem .gIt

2 g/g 10 isgangobjectgcapablegofgmanipulatinggagvalue.gIfgitgisgagcomparisongorglogicalgo peratorgitgwouldgcomparegtogseegifgtheygaregsimilargorgdissimilar.gIfgitgisgagmat hematicalgoperatorgitgwouldgperformgmathematicalcalculations.

  1. What g is g an g expression gANS gsomethinggthatghasgagvalue.
  2. What g is g the g difference g in g a g terminal g and g non-terminal g expression gANS gAgterminalisgagfinalgvalue,gwhilegagnon-terminalgcangbegreducedgfurther.
  3. What g is g proper g Python g grammar g for g making g an g expression gANS gExpressiong’ExpressiongOperatorgExpression ThegExpressiongnon- terminalgthatgappearsgongthegleftgsidegcangbegreplacedgbygangExpression,gfoll owedgbygangOperator,gfollowedgbyganothergExpression.gForgexample,g 1 g+g 1 gisg angExpressiongOperatorgExpression.
  4. What g is g a g variable gANS gagnamegthatgrefersgtogagvalue

4 g/g 10 one gANS gstringgisgagsequencegofgcharactersgsurroundedgbygquotes,geithergsingle gorgdouble example:gmyVarg=g"stringgdata"

  1. Integer g is g a g number :gANS gexample:gmyVarg=g 33
  2. Boolean g is g a g true g or g false g value: gANS gexample:gmyVarg=gTrue
  3. What g is g grammar g used g for g in g programming gANS gIngagprogrammingglanguageglikePython,gthegcodegmustgmatchgtheglangu ageggrammargexactly.gWhengprogrammingglanguageggrammargisgnotgfollowe dgtheginterpretergwillgreturngagSyntaxgErrorgmessage.Thisgmeansgthatgthegstruc turegofgthegcodegisginconsistentgwithgthegrulesgofgthegprogrammingglanguage.
  4. How g do g you g change g the g value g of g a g variable g with g Python gANS gUsinggtheg=charactergtogassigngagnewgval uegxg=g 6 xg=g 9
  • 5 g/g
  • printgxg#gwouldgprintgoutg

7 g/g 10 17.g +: gconcatenategorgadd

8 g/g 10 18.g =: gassignment

  1. *: gmultiply
  2. -: gsubtract
  3. /: gdivide
  4. %: gModulos,gdoesgdivisiongandgreturnsgthegremainder
  5. What g does g the g ***** g operator g do g when g applied g to g string g datagANS gItgwritesgoutg thegstringgdatagmultiplegtimes.gForgexample,gprintg'!'g*g 12 gwouldgoutputg!!!! !!!!!!!!g(12exclamationgpoints).
  6. What g does g a g procedure g dogANS gtakesginginputs,gdoesgsomegprocessin g,gandproducesgoutputs
  7. What g is g the g difference g in g a g procedure g and g a g functiongANS gAgproceduregandg agfunctiongingpythongaregthegsamegsogtheregisgnogdifference.gTheygbothgtakegi nputsgandmaygorgmaygnotgreturngoutputs.
  8. What g is g a g parametergANS gInputgtogagproceduregorgfunction
  9. What g is g the g difference g in g an g input, g an g operand, g and g a g parameter g ANS Nothing!Theygaregallgdifferentgnamesgusedgtogdescribeginputsgtogagprocedure.
  10. What g are g the g advantages g of g using g a g function g ANS gFunctionsgcangbegusedg

10 g/ g 10 onceandgthengcangbegcalledgupongmultiplegtimesgwithingthegprogram.

  1. When g does g a g function g executegANS gWhengyougexplicitlygaskgitgtogexe cutegbygcallingthegfunctiongandgpassingginganygparameters.gWegrefergtogthi sgasginvokinggorgcallinggthegfunction.

11 g/ g 10

  1. How g do g you g define g outputs g for g a g functiongANS gUsinggthegreturngkeywordgyo ugcandefinegwhatgdatagwillgbegreturnedgorgoutputgwhengthegproceduregorgfun ctiongruns.gYoucangonlygaccessgdatagfromgwithingagfunctiongifgyougreturngthatg specificgdatagtogbegusedoutsidegofgthegfunction.
  2. How g is g a g while g loop g constructed g in g Python? g What g is g its g purpose g ANS g executesanygnumbergofgtimes,gcontinuinggasglongg asgthegtestgexpressiongisgTruegwhileg:
  3. How g is g an g if g else g statement g constructed g in g Python? g What g is g its g purpose g ANS g - gprovidesgagwaygtogcontrolgwhatgcodegexecutesgbasedgongthegresultgofgagtestge xpressionifg: <block

gelse:

  1. How g are g compound g mathematical g expressions g evaluated g in g Python g ANS Firstperformgcalculationsgwithingparentheses. Nextgworkgleftgtogrightgandgperformgallgmultiplicationgandgdivision .gFinally,gworkgleftgtogrightgandgperformgallgadditiongandgsubtractio n
  2. What g is g the g function g of g parentheses, g (), g in g programming g expressionsgANS - gWhengwegaregworkinggwithgangexpression,gtheyggroupgitemsgwithi ngthatgexpressions.Itemsgwithingparenthesesgaregevaluatedgfirst.g Forgexample:g(5g+g3)g*g 8 g=g 64 gbecausegwegdogthegadditiongfirst,gthe

13 g/ g 10

  1. <: glessgthan
  2. >: ggreatergthan
  3. <=: glessgthangorgequalgto
  4. >=: ggreatergthangorgequalgto 39.g ==: gcomparisonsgequality
  5. How g does g the g OR g operator g evaluate g two g operands g ANS g Ifg <Expression

ghasgaTruegvalue,gthegresultgisgTruegandggisgnotgevaluatedg(s ogevengifgitgwouldproducegangerrorgitgdoesgnotgmatter).gIfgghasg agFalsegvalue,gthegresultofgthegorgisgthegvaluegofg.

  1. How g does g the g AND g operator g evaluate g two g operandsgANS gIfg ghasagFalsegvalue,gthegresultgisgFalsegandggisgnotgevaluatedg(s ogevengifgitwouldgproducegangerrorgitgdoesgnotgmatter).gIfgghas gagTruegvalue,gtheresultgofgthegandgisgthegvaluegofg.

14 g/ g 10

  1. How g are g elements g in g a g list g indexed g ANS gListgelementsgaregassignedgangi ndexnumbergstartinggwithg0.
  2. What g is g mutation? g Do g lists g support g mutation g ANS gThisgisgthegabilitygtogchangegthegvaluegofgsom ething.gListsgsupportgmutation,gallowinggyougtogchangeg thegoveralllengthga sgwellgasgindividualgelementsgwithingtheglist.
  3. How g is g a g for g loop g constructed g in g Python? g What g is g its g purposegANS gAgforgloopgprovidesgagwaygtogexecutegagblockgoncegf orgeachgelementgofgaglist.gThegsyntaxgisgthis:forgging:
  4. How g do g you g select g a g sub- sequence g of g a g list g with g PythongANS gYougspecifygthegindexgpositiongtogbegingth egselectiongandgthegindexgpositiongbygwhichgtogstopgthegselection.gForgexam ple,gthegfollowinggcodegwouldgprintgredgandgyellowgbecausegtheyaregatgposit iong 0 gandg1.Thegvaluegofg 2 gtellsgusgtogstopgthegselectiongatgpositiong2,gbutnotg togincludegit. myColorsg=g["red","yellow","blue","orange"," green"]gprintgmyColors[0:2]
  5. What g does g the g pop g method g do g to g a g list g in g PythongANS g Bygdefaultg itgremove sgtheglastgelementgfromgaglist.gItgcangalsogbegusedgwithgangindexgnumbergtogre movegagspecificgelementgthatgisgnotginglastgplace.gForgexample,gthegfollowingg codegwouldgprintred,gyellow,gblue,gandgorangegbecausegpopgremovedggreeng fromgthegendgofgtheglist.

16 g/ g 10

  1. How g would g you g remove g a g specific g element g from g a g listgANS gUsinggthegpopgm ethodgandgspecifyinggthatgspecificgelement'sgindexgposition.gForgexample,gt hegfollowinggcodegwouldgprintgred,gblue,gorange,ggreengbecausegpopgremove sgthegcolorgyellow. myColorsg=g["red","yellow","blue","orange"," green"]gmyColors.pop(1) printgmyColors
  2. How g do g you g update g a g list g item g with g PythongANS gBygspecifyinggthegelemen tgthatyougwantgtogupdategandgthengassigninggagnewgvalue.gForgexample,gth egfollowinggcodewouldgchangegthegsecondgelementginglist,gfromgyellowgtogp urple. myColorsg=g["red","yellow","blue","orange","green"]

17 g/ g 10 myColors[1]g=g"purple"g printgmyColors

  1. If g your g Python g list g contains g multiple g lists, g how g do g you g locate g a g specific g value gANS gBygspecifyinggthegelementsgusinggindexgpositionsgtogfirstgselectgthegsub
  • glist,thengthegelementgwithingthegsub- list.gForgexample,gthegfollowinggcodegwouldgselectgthegvaluegred: favColors=g[['jessica','red'],g['grace','yellow'],g['john',' blue']]gprintgfavColors[0][1]
  1. What g does g the g append g operator g do g to g a g listgANS gMutatesgaglistgbygadd inggelementsgtogthegendgofgtheglist.gThegfollowinggcodegwouldgprintgoutgt heglistgofgred,yellow,gblue,gorange,ggreen,gandgpurple. myColorsg=g["red","yellow","blue","orange"," green"]gmyColors.append("purple") printgmyColors
  2. What g is g an g objectgANS gSomethinggthatghasgitsgowngidentityga ndgcharacteristics,separategfromgothergobjects.
  3. What g three g things g describe g an g object g in g object- oriented g programming g languagesgANS gidentity,gattributes,gandgbehavior
  4. What g is g a g class? g How g do g you g define g a g class g in g Python g ANS gAgclassgdescribeswhatgangobjectgwi llgbe,gbutgitgisn'tgthegobjectgitself.gAgclassgisgagblueprint,g agdetailedgdescriptio n,gagdefinitiongofgangobject.gThegsyntaxgforgcreatinggagclassgingPythongis:

19 g/ g 10

  1. Why g would g we g create g a g classgANS gTogcreategagblueprintgupongwhichg togbuildmultiplegobjectsgthatgsharegattributesgandgbehaviors
  2. What g is g the g difference g in g an g object g and g a g classgANS gAngobjectgisgsomethingg thatghasgitsgowngidentifygandgcharacteristics,gseparategfromgothergobjects.gAg classgdescribesgthatgobjectgwillgbe,gbutgitgisn'tgthegobjectgitself.gForgexample,g aghousegisgangobjectgandgthegblueprintsgusedgtogcreategitgwouldgbegconsidere dgthegclass.
  3. How g do g you g use g dot g notation g to g access g an g attribute g of g a g classgANS gYouglistgth egindividualgobject'sgnamegthatgisganginstancegofgthegclass,gagdot,gandgthength egattributegname.gForgexamplegmyClass.colorgwouldgaccessgthegcolorgassoci atedgwithgthegobjectmyClass.
  4. What g is g instantiationgANS gCreatingginstancesgofgagclass
  5. What g is g abstraction g ANS gFocusgongthegessentialgqualitiesgofgsomethinggrat hergthanonegspecificgexample.gForgexample,gifgIgsaygagtablegyoughavegangideag ofgwhatgIgmean

20 g/ g 10 evengthoughgIgdidn'tgsaygifgitgwasgwood/glassgorgbig/ small.gThisgisgthegessentialgideagbehindgcreatinggclasses.

  1. What g is g encapsulation g ANS gSurroundinggsomething,gnotgjustgtogkeepgthegc ontentstogether,gbutgalsogtogprotectgthosegcontents.gRestrictsgaccessgtogtheg innergworkingsgofgagclassgorganygobjectsgbasedgongthatgclass;gthisgisgreferredgt ogasginformationghidingorgdataghiding.
  2. What g is g inheritance? g How g does g inheritance g apply g to g working g with g class- g esgANS gAgformgofgcodegreuse.gWegcangcreategagnewgclass,gbutginsteadgofgwriti nggitgfromgscratch,gwegcangbasegitgongangexistinggclass.gItgwouldginheritgsomeg ofgthegcharacteristicsgofgthegbasegclassgbutgcouldgalsoghavegitsgownguniquegpr opertiesgandgmethodsgthatgaregnotgsharedgwithgthegbasegclass.
  3. What g is g polymorphism? g How g does g polymorphism g apply g to g working g with g classesgANS gMeansgmanygfor ms.gItgletsgusgautomaticallygdogthegcorrectgbehaviorgevenifgwhatgwe'regworki nggwithgcouldgtakegonegofgmanygdifferentgforms.gTheg+gisgaggreatgexample.gIfg we'regaddinggtwogvariablesgtogethergwithgthegplusgsign,gandgthesegvariables garegintegers,gitgwillgnumericallygaddgthem.gButgifgtheygaregtwogstringsgitgwillgc oncatenategthem.gWithgclassesgthisgallowsgusgtogworkgwithgobjectsgcreatedgf romgdifferentgclasses.
  4. What g are g the g differences g in g a g hashed g search g and g a g linear g searchgANS gAglinea rsearchggoesgthroughgeachgentrygonegatgagtimegtogseegifgthegsearchgwordgmat chesgthewordgyougareglookinggfor.gWithgaglargegindexgandglotsgofgqueriesgthisg willgbegagverygslowgprocess.gAghashedgsearchgmapsgthosegentriesgtogagnumbe r,gorgkeyword,gandgplacesgthosegintogbuckets.gThisgwaygyougknowgwhichgbuck etgtogstartglookinggatgforgaparticulargentryginsteadgofglookinggthroughgallgofgth