WGUl D335l Objectivel Assessmentl (Latestl 2025/l 2026l Update)l Introductionl tol Programmingl inl Pythonl Guide|l Questionsl &l Answers|l Gradel A|l 100%l Correctl (Verifiedl Solutions)
Q:l Completel al statementl thatl readsl al user-enteredl stringl intol variablel my_var.
Answer:
my_varl =l input()
Q:l whatl functionl isl usedl forl al strongl thatl containsl onlyl numbers
Answer:
int()
Q:l runtimel error
Answer:
al program'sl syntaxl isl correctl butl thel programl attemptsl anl impossiblel operation,l suchl asl dividingl byl zerol orl multiplyingl stringsl togetherl (likel 'Hello'l *l 'ABC')
Q:l SyntaxError
Answer: 1 / 3
Thel programl containsl invalidl codel thatl cannotl bel understood.
Q:l IndentationError
Answer:
Thel linesl ofl thel programl arel notl properlyl indented.
Q:l ValueError
Answer:
Anl invalidl valuel isl usedl -l canl occurl ifl givingl lettersl tol int().
Q:l NameError
Answer:
Thel programl triesl tol usel al variablel thatl doesl notl exist.
Q:l TypeError
Answer:
Anl operationl usesl incorrectl typesl -l canl occurl ifl addingl anl integerl tol al string.
Q:l machinel instructions
Answer:
Inl thel 1940s,l programmersl originallyl wrotel eachl instructionl usingl 0sl andl 1s,l suchl asl "001l 1100001l 001001l 1100010".l Instructionsl representedl asl 0sl andl 1s
- / 3
Q:l whatl isl incrementingl al variable?
Answer:
usingl xl =l xl +l 1
Q:l rulesl forl indetifiers
Answer:
akal name.l
sequencel ofl letters,l underscores,l andl digits.l
Mustl startl withl letterl orl underscore.l
casel sensitive
Q:l Thisl represetsl al valuel andl isl automaticallyl createdl byl thel interpreterl whenl executingl al linel ofl code.l Usedl tol representl everythingl inl al Pythonl program,l includingl integers,l strings,l functions,l lists,l etc
Answer:
Object
Forl example,l executingl xl =l 4l createsl al newl objectl tol representl thel valuel 4.l Al programmerl doesl notl explicitlyl createl objects;l instead,l thel interpreterl createsl andl manipulatesl objectsl asl neededl tol runl thel Pythonl code
Q:l Thisl keepsl thel memoryl ofl thel comuterl lessl utilizedl inl Python.
Answer:
garbagel collecting
- / 3