CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<simplecpp>
main_program{
    char input1,input2;
    cin>>input1>>input2;
    if(input1=='r' && input2=='p'){
        cout<<"2";
    }
    if(input1=='p' && input2=='r'){
        cout<<"1";
    }
    if(input1=='s' && input2=='r'){
        cout<<"2";
    }
    if(input1=='r' && input2=='s'){
        cout<<"1";
    }
    if(input1=='p' && input2=='s'){
        cout<<"2";
    }
    if(input1=='s' && input2=='p'){
        cout<<"1";
    }
    if(input1==input2){
        cout<<"T";
    }

}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<simplecpp>

main_program{
    
    char input;
    char input2;
    cin>>input;
    cin>>input2;

    if(input == 'p' && input2 == 'p'){
        cout<<"T"<<endl;
    }
    if (input == 'p' && input2 == 'r'){
        cout<<"1"<<endl;
    }
    if (input == 'p' && input2 == 's'){
        cout<<"2"<<endl;
    }
    if (input == 's' && input2 == 's'){
        cout<<"T"<<endl;
    }
    if (input == 's' && input2 == 'p'){
        cout<<"1"<<endl;
    }
    if (input == 's' && input2 == 'r'){
        cout<<"2"<<endl;
    }
    if(input == 'r' && input2 == 'r'){
        cout<<"T"<<endl;
    }
    if(input == 'r' && input2 == 'p'){
        cout<<"2"<<endl;
    }
    if(input == 'r' && input2 == 's'){
        cout<<"1"<<endl;
    }



}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<simplecpp>
main_program{
    char x,y;
     char p,s,r;
    cin>>x>>y;
    if(x=='p' && y=='p' || x=='r' && y=='r' || x=='s' && y=='s'){
    cout<<"T";}
    else if(x=='p' && y=='r' || x=='s' && y=='p'){
    cout<<"1";}
    else if(x=='r' && y=='p' || x=='p' && y=='s'){
    cout<<"2";}
        
    }

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<simplecpp>
main_program{
cout << "Enter the Player 01";
cin >> "Player 01";
cout << "Enter the Player 02";
cin >> "Player 02";
if("Player 01 choose Rock and Player 02 choose Paper and Rock beats Paper");
cout << "Player 01 wins";
else;
cout << "Player 02 wins";
if("Player 01 choose Rock and Player 02 choose Scissors and Rock beats Scissors");
cout << "Player 01 wins";
else;
cout <<"Player 02 wins"
if("player 01 choose Paper and Player 02 choose Rock and Paper beats Rock");
cout <<"Player 01 wins";
else;
cout <<"Player 02 wins";
if("Player 01 choose Paper and Player 02 choose Scissors and Paper beats scissors");
cout << "Player 01 wins";
else;
cout << "Player 02 wins";
if("Player 01 choose Scissor and Player 02 choose paper and Scissor beats Paper");
cout << "Player 01 wins";
else;
cout << "Player 02 wins";
if("Player 01 choose scissor and Player 02 Rock and scissor beats Rock");
cout << "Player 01 wins";
else;
cout << "Player 02 wins";
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: C
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<iostream>
using namespace std;
bool beats(char p1, char p2){
        if (p1 == 'r' && p2 == 's') return true;
        else if (p1 == 's' && p2 == 'p') return true;
        else if (p1 == 'p' && p2 == 'r') return true;
        return false;
}
int main(){
        char p1, p2;
        cin >> p1; cin >> p2;
        if (p1 == p2) cout << 'T';
        else{
                if (beats(p1, p2)) cout << 1;
                else cout << 2;
        }
        cout<<endl;
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include <simplecpp>

main_program{
    char a,b;
    cin>>a>>b;

if (a=='r'&& b=='p')
{cout <<"2";}
 else if (a=='r'&& b=='s')
{cout <<"1";}


 else if(a=='r'&& b=='r')
{cout <<"T";}
 else if (a=='s'&& b=='s')
{cout <<"T";}
 else if (a=='p'&& b=='p')
{cout <<"T";}


 else if (a=='s'&& b=='r')
{cout <<"2";}
 else if(a=='p'&& b=='s')
{cout <<"2";}
 else if (a=='s'&& b=='p')
{cout <<"1";}
 else if (a=='p'&& b=='r')
{cout <<"1";}
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<simplecpp>
main_program
{
    char c1, c2;
    cin >> c1 >> c2;

    if(c1==c2)
    cout << "T";

    else if((c1=='r' && c2=='s') || (c1=='s' && c2=='p') || (c1=='p' && c2=='r'))
    {
        cout << 1 << endl;
    }
    else if((c1=='s' && c2=='r') || (c1=='p' && c2=='s') || (c1=='r' && c2=='p'))
    {
        cout << 2 << endl;
    }
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include <simplecpp>

main_program {
	char p1, p2;
	cin >> p1 >> p2;
	
	char out;
	
	if (p1 == p2) {
		out = 'T';
	} else {
		if (p1 == 'r') {
			if (p2 == 's') {
				out = '1';
			} else {
				out = '2';
			}
		}else if (p1 == 'p') {
			if (p2 == 'r') {
				out = '1';
			} else {
				out = '2';
			}
		}else if (p1 == 's') {
			if (p2 == 'p') {
				out = '1';
			} else {
				out = '2';
			}
		}
	}
	
	cout << out << endl;
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include <simplecpp>

int main () {
    char p1, p2;
    cin >> p1 >> p2;
    if (p1 == 'r') {
        if (p2 == 'r') cout << "T" << endl;
        else if (p2 == 'p') cout << "2" << endl;
        else if (p2 == 's') cout << "1" << endl; 
    }
    if (p1 == 'p') {
        if (p2 == 'r') cout << "1" << endl;
        else if (p2 == 'p') cout << "T" << endl;
        else if (p2 == 's') cout << "2" << endl; 
    }
    if (p1 == 's') {
        if (p2 == 'r') cout << "2" << endl;
        else if (p2 == 'p') cout << "1" << endl;
        else if (p2 == 's') cout << "T" << endl; 
    }
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<simplecpp>
main_program{
    char input1, input2; cin >> input1>> input2;
    if (input1 == 'p' && input2 == 'p'){
        cout << "T";
    }
    if (input1 == 'p' && input2 == 's'){
        cout << "2";
    }
    if (input1 == 'p' && input2 == 'r'){
        cout << "1";
    }
    if (input1 == 's' && input2 == 's'){
        cout << "T";
    }
    if (input1 == 's' && input2 == 'p'){
        cout << "1";
    }
    if (input1 == 's' && input2 == 'r'){
        cout << "2";
    }
    if (input1 == 'r' && input2 == 'r'){
        cout << "T";
    }
    if (input1 == 'r' && input2 == 'p'){
        cout << "2";
    }
    if (input1 == 'r' && input2 == 's'){
        cout << "1";
    }
 }

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include <simplecpp>
main_program{
    char a, b; 
    cin>>a>>b;
    if(a == 'r' && b == 's'){
        cout<<"1";
    }
    if(a == 'r' && b == 'p'){
        cout<<"2";
    }
    if(a == 'p' && b == 'r'){
        cout<<"1";
    }
    if(a == 'p' && b == 's'){
        cout<<"2";
    }
    if(a == 's' && b == 'p'){
        cout<<"1";
    }
    if(a == 's' && b == 'r'){
        cout<<"2";
    }
    if(a == b){
        cout<<"T";
    }
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<simplecpp>
main_program{
char a,b;
cin>>a;
cout<<" ";
cin>>b;
if(a==b){cout<<"T"<<endl;}
else if(a=='r'){if (b=='p')cout<<"2"<<endl; else cout<<"1"<<endl;}
else if(a=='p'){if (b=='s')cout<<"2"<<endl; else cout<<"1"<<endl;}
else if(a=='s'){if (b=='r')cout<<"2"<<endl; else cout<<"1"<<endl;}
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<simplecpp>
main_program
{
    char p1;
    cin>>p1;
    char p2; 
    cin>>p2;
    char r,p,s;
    
    if(p1=='r' && p2=='p')
    {
        cout<<"2";
    }
    else if(p1=='r' && p2=='s')
    {
      cout<<"1";
    }
    else if(p1=='s' && p2=='p')
    {
        cout<<"1";
    }
    else if(p1=='s' && p2=='r')
    {
        cout<<"2";
    }
    else if(p1=='p' && p2=='r')
    {
        cout<<"1";
    }
    else if(p1=='p' && p2=='s')
    {
        cout<<"2";
    }
    else if(p1==p2)
    {
        cout<<"T";
    }
}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include <simplecpp>

main_program{
char p1;
char p2;

cin>>p1;
cin>>p2;
bool wini;
bool winu;
wini = (p1=='r'$$p2=='s' || p1=='s'$$p2=='p' || p1=='p'$$p2=='r')
if(wini){
        cout<<"1"<<endl;
        }
winu = (p2=='r'$$p1=='s' || p2=='s'$$p1=='p' || p2=='p' $$p1=='r'){
        else if (winu){cout<<"2"<<endl;
        }
else {cout<<"T"<<endl;};
}
~

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A
Problem: Rock-Paper-Scissors is a simple game played by two people, where the two players simultaneously gesture any one of the three objects ‘rock’, ‘paper’, or ‘scissors’. The rules are straightforward: rock beats scissors, scissors beats paper, and paper beats rock. The outcome of each round is a win for the player whose object beats that of the other player, or a tie if both players choose the same object. For example, if player 1 chooses rock and player two chooses paper, then player 2 wins as paper beats rock. 

Write a C++ program to accept two characters as input from the user. These denote the choice made by player 1 and player 2, respectively. The choices would be r for rock, p for paper, and s for scissors. Print which player wins (1 or 2, or T for tie). 

Input Format Two characters in lowercase. 

Output Format 1 or 2 or T 

Assumptions on Input Assume that the characters input by the user will be either r, p, or s.

Student submission:
#include<simplecpp>
main_program
{   char p1,p2;
    cin>>p1>>p2;
    if(p1=='r'&& p2=='s' || p1=='p' && p2=='r' || p1=='s' && p2=='p')
    cout<<1;
    else if(p1=='r' && p2=='r' || p1=='s'&& p2=='s' || p1=='p'&& p2=='p')
    cout<<'T';
    else
    cout<<2;

}

Grading criterion: Output
Rating A: correctly prints the output
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A