5. Repeated execution Flashcards

1
Q

Where should we write comments?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is writing comments a good idea?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does it mean if args.length is zero?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the benefit of being able to use a variable as a list index?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between Java and pseudo code?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does iteration mean?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the value of Math.pow(10 , 2). Is it 100 or 1024?

A

dd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the value of Math.abs(-2.7)?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What type does the value of Math.PI have?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the effect of x = x * 10;?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the similarity between the while loop and the if statement?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly