Question: Question 2 Compiling and preparing files Trial 1 : Executing program Comparing output Output not correct The expected output was: 1 0 false 8 9

Question 2
Compiling and preparing files
Trial 1:
Executing program
Comparing output
Output not correct
The expected output was:
10
false
8913
true
Your program produced:
10
false
7407
false
Input supplied to your program:
construct 3
guessesRemaining()
gameOver()
giveUp()
gameOver()
Q
Differences in the files are as follows:
3,4c3,4
<8913
< true
---
>7407
> false
Trial points: 0/100
Trial 2:
Executing program
Comparing output
Output not correct
The expected output was:
10
0 cows and 0 bulls
9
1 cow and 0 bulls
8
2 cows and 0 bulls
7
3 cows and 0 bulls
6
4 cows and 0 bulls
5
Your program produced:
10
1 cow and 0 bulls
9
0 cows and 0 bulls
8
1 cow and 0 bulls
7
2 cows and 0 bulls
6
2 cows and 0 bulls
5
Input supplied to your program:
construct 4
guessesRemaining()
guess()2358
guessesRemaining()
guess()1235
guessesRemaining()
guess()1735
guessesRemaining()
guess()1749
guessesRemaining()
guess()1746
guessesRemaining()
Q
Differences in the files are as follows:
2,3d1
<0 cows and 0 bulls
<9
4a3,4
>9
>0 cows and 0 bulls
6c6
<2 cows and 0 bulls
---
>1 cow and 0 bulls
8c8
<3 cows and 0 bulls
---
>2 cows and 0 bulls
10c10
<4 cows and 0 bulls
---
>2 cows and 0 bulls
Trial points: 0/100
Trial 3:
Executing program
Comparing output
Output not correct
The expected output was:
10
0 cows and 0 bulls
9
0 cows and 1 bull
8
0 cows and 2 bulls
7
0 cows and 3 bulls
6
0 cows and 4 bulls
5
true
Your program produced:
10
1 cow and 0 bulls
9
1 cow and 0 bulls
8
1 cow and 0 bulls
7
1 cow and 0 bulls
6
1 cow and 0 bulls
5
false
Input supplied to your program:
construct 8
guessesRemaining()
guess()2358
guessesRemaining()
guess()2758
guessesRemaining()
guess()2748
guessesRemaining()
guess()6748
guessesRemaining()
guess()6741
guessesRemaining()
gameOver()
Q
Differences in the files are as follows:
2c2
<0 cows and 0 bulls
---
>1 cow and 0 bulls
4c4
<0 cows and 1 bull
---
>1 cow and 0 bulls
6c6
<0 cows and 2 bulls
---
>1 cow and 0 bulls
8c8
<0 cows and 3 bulls
---
>1 cow and 0 bulls
10c10
<0 cows and 4 bulls
---
>1 cow and 0 bulls
12c12
< true
---
> false
Trial points: 0/100
Trial 4:
Executing program
Comparing output
Output not correct
The expected output was:
10
1 cow and 0 bulls
9
2 cows and 1 bull
8
1 cow and 1 bull
7
2 cows and 2 bulls
6
0 cows and 4 bulls
5
Your program produced:
10
1 cow and 0 bulls
9
2 cows and 0 bulls
8
2 cows and 0 bulls
7
4 cows and 0 bulls
6
4 cows and 0 bulls
5
Input supplied to your program:
construct 33
guessesRemaining()
guess()2468
guessesRemaining()
guess()2158
guessesRemaining()
guess()2458
guessesRemaining()
guess()1325
guessesRemaining()
guess()1352
guessesRemaining()
Q
Differences in the files are as follows:
4c4
<2 cows and 1 bull
---
>2 cows and 0 bulls
6c6
<1 cow and 1 bull
---
>2 cows and 0 bulls
8c8
<2 cows and 2 bulls
---
>4 cows and 0 bulls
10c10
<0 cows and 4 bulls
---
>4 cows and 0 bulls

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!