Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

iSQI CTAL-ATT Exam - Topic 9 Question 19 Discussion

Posted by Sheron on Jul 25, 2023 at 07:44 PM

Consider the following section of pseudocode:

function getPassword() {

var x;

var y;

var z;

var passwordGood = false

// Get password from user, user is allowed 3 tries

do until x = 3

call getPassword (password)

if password is good

x = 3

passwordGood = true

else

X = X + 1

display ''Password is not valid, try again''

endif

If passwordGood <> true

display ''You exceeded the number of tries to enter a password. Your account is now locked. Call customer service.''

endif

endloop

}

For this section of code, which of the following issues should be identified during a code review?

Variables have not been properly defined with meaningful names

There are unused variables defined

Divisors are not tested for zero

Loop counters are not properly initialized

There are endless loops

There are statements within the loop that should be outside the loop

Suggested Answer: C

Get Premium CTAL-ATT Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
28 comments · newest first
RU
Rueben 11 months ago
Unused variables? That's surprising!
CH
Chantell 11 months ago
I think option B is the best choice.
MA
Marion 11 months ago
Wait, are there really endless loops here?
FR
Franklyn 11 months ago
Totally agree, they need to be more descriptive!
CA
Carri 12 months ago
The variable names are super vague.
JE
Jesusa 12 months ago
I feel like there are definitely some variables that aren't being used, but I'm confused about the loop counter initialization. It seems like it should be fine.
NI
Nieves 12 months ago
I think we practiced a question similar to this, and I recall that endless loops can be a problem, so maybe option C is correct?
AL
Aleta 1 year ago
I'm not sure about the unused variables part, but I feel like there might be an issue with the loop not terminating properly.
PA
Pauline 1 year ago
I remember we discussed how variable names should be meaningful, so I think option D might be right about that.
AB
Abel 1 year ago
Hmm, I'm a bit unsure about this one. I know we need to configure something to deploy apps to Android Enterprise devices, but I'm not sure if linking the Managed Google Play account is the first step. Maybe I should review the Intune documentation again to be sure.
LE
Lettie 1 year ago
This looks like a straightforward question about the properties of the Number type in JavaScript. I'll need to think carefully about the differences between the options.
GI
Gilbert 1 year ago
Hmm, I'm a bit unsure about this one. I need to carefully read through the options and think about which features are specific to Service Cloud.
PO
Portia 1 year ago
Ah, the good old 'password is not valid, try again' message. Bet the user's gonna feel real confident after seeing that five times in a row. Tech support, here we come!
DA
Danica 1 year ago
↳ replying to Portia
B) 2, 3, 4, 6
ZA
Zack 1 year ago
↳ replying to Portia
I think the issue is with the variables not having meaningful names and the loop counters not being properly initialized.
CA
Callie 1 year ago
↳ replying to Portia
B) 2, 3, 4, 6
JE
Jennie 1 year ago
↳ replying to Portia
A) 1, 3, 4, 5
JE
Jesusa 1 year ago
↳ replying to Portia
Yeah, those variable names could use some work.
BU
Buck 1 year ago
↳ replying to Portia
A) 1, 3, 4, 5
JE
Jeniffer 1 year ago
Statements outside the loop? Rookie move. That's like putting the cart before the horse. Gotta keep that logic tight, you know?
BE
Bernadine 1 year ago
Ah, the old 'loop counter not properly initialized' problem. Classic coding blunder right there. Gotta watch out for those endless loops, too!
TA
Tamie 1 year ago
Wait, why are we testing for zero divisors? This is a password validation function, not a math equation. Seems a bit off the mark.
KA
Kati 2 years ago
Hmm, the variable names could definitely be more descriptive. And what's up with those unused variables? Seems like a rookie mistake to me.
WA
Walker 1 year ago
↳ replying to Kati
User2: I agree, they should have used more descriptive names.
TU
Tula 1 year ago
↳ replying to Kati
User1: Yeah, those variable names are really confusing.
AN
Annett 2 years ago
I'm not sure, but I think option B might also be correct. It mentions unused variables and statements within the loop that should be outside the loop.
LE
Leonora 2 years ago
I agree with Shanda. Option A seems to cover all the issues mentioned in the code review question.
SH
Shanda 2 years ago
I think the correct answer is A) 1, 3, 4, 5 because variables should have meaningful names, divisors need to be tested for zero, loop counters should be properly initialized, and there should not be endless loops.
0/2000 characters

Save Cancel