5. Repeated execution Flashcards
1
Q
Where should we write comments?
A
ss
2
Q
Why is writing comments a good idea?
A
ss
3
Q
What does it mean if args.length is zero?
A
ss
4
Q
What is the benefit of being able to use a variable as a list index?
A
ss
5
Q
What is the difference between Java and pseudo code?
A
ss
6
Q
What does iteration mean?
A
ss
7
Q
What is the value of Math.pow(10 , 2). Is it 100 or 1024?
A
dd
8
Q
What is the value of Math.abs(-2.7)?
A
ss
9
Q
What type does the value of Math.PI have?
A
ss
10
Q
What is the effect of x = x * 10;?
A
ss
11
Q
What is the shorthand way of writing each of the following? x = x + 1; x = x - 1; x = x + y; x = x - y; x = x * y; x = x / y;
A
s
12
Q
What is the similarity between the while loop and the if statement?
A
ss
13
Q
What are the four parts of a for loop? When should a for loop be used instead of a while loop?
A
ss