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 T,x,y,p,r,s;
    int a,b;
    a = 1 , b = 2;
    T = T , p = p, s = s , r = r;
    
    if ( x == p && y == p){ cin >> x ;
    cin >> y ;
        cout << "T:" ;
    }
     else if ( x == r && y == p){
        cout << "b:" ;   }
     else if ( x == s && y == p){
        cout << "a:" ;    }
    else if ( x == r && y == r){
        cout << "T:" ;    }
        else if ( x == s && y == s){
        cout << "T:" ;    }  
        else if ( x == s && y == r){
        cout << "b:" ;    }
       else if ( x == r && y == s){
        cout << "a:" ;   }
        else if ( x == p && y == r){
        cout << "b:" ;   }
        else if ( x == p && y == s){
        cout << "a:" ;   } 
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: B
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;
    char b;
    cin>>a;
    cin>>b;
    if (a=='r'){
        if (b=='p') cout<<2;
        if (b=='s') cout<<1;
        if (b=='r') cout<<'T';
    }
    if (a=='p'){
        if (b=='s') cout<<2;
        if (b=='r') cout<<1;
        if (b=='p') cout<<'T';
    }
    if (a=='s'){
        if (b=='r') cout<<2;
        if (b=='p') cout<<1;
        if (b=='s') cout<<'T';
    }
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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')||(input1 =='r' && input2=='r')||(input1 =='s' && input2=='s')){
        cout<<"T";
    }
    
if((input1=='r'&&input2=='s')|| (input1=='p'&&input2=='r')||(input1=='s'&&input2=='p')){
cout<< 1;
}


if((input1=='s'&&input2=='r')|| (input1=='r'&&input2=='p')||(input1=='p'&&input2=='s')){
cout<< 2;
}
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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==p2)
    cout<<"T";
    else if ((p1=='r'&&p2=='p')||(p1=='p'&&p2=='s'||p1=='s'&&p2=='r'))
    cout<<"2";
    else if ((p1=='p'&&p2=='r')||(p1=='s'&&p2=='p'||p1=='r'&&p2=='s'))
    cout<<"1";
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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=='s')
        cout<<2;
    if(a=='p'&&b=='r')
        cout<<1;
    if(a=='s'&&b=='r')
        cout<<2;
    if(a=='s'&&b=='p')
        cout<<1;
    if(a==b)
        cout<<"T";
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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<iostream>
using namespace std;
int main(){
    char p1,p2;
    cin>>p1>>p2;
    if(p1==p2){cout<<'T'<<endl;}
    else if((p1=='r' and p2=='s')||(p1=='s' and p2=='p')||(p1=='p' and p2=='r')){
        cout<<1<<endl;
    }else{cout<<2<<endl;}
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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==p2)
    cout << 'T';
    else if(p1=='p'){
        if(p2=='r') cout << 1;
        else cout << 2;
    }
    else if(p1=='r'){
        if(p2=='p') cout << 2;
        else cout << 1;
    }
    else {
        if(p2=='p') cout << 1;
        else cout << 2;
    }
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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{
    bool done = false;
    if(!done){
    char m,n;
    cin >> m >> n;
    if(m=='r' && n=='p' || m=='s' && n=='r' || m=='p' && n=='s'){
        cout << "2";
    }
    else if(m=='p' && n=='r' || m=='r' && n=='s' || m=='s' && n=='p'){
        cout << "1";
    }
    else if(m=='p' && n=='p' || m=='s' && n=='s'|| m=='r' && n=='r'){
        cout << "T";
    }
    }
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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==b){
        cout << "T";
    }
    else if(a=="p"){
        if(b=="s"){
            cout << 2;
        }
        else{
            cout << 1;
        }
    }
    else if(a=="s"){
        if(b=="r"){
            cout << 2;
        }
        else {
            cout << 1;
        }
    }
    else if(a=="r"){
        if(b=="p"){
            cout << 2;
        }
        else{
            cout << 1;
        }
    }
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: B
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;cin>>c1;
    char c2;cin>>c2;
    char result;
    if (c1=='r') {
        if (c2=='r') { result='T';}
        if  (c2=='p') { result='2';}
        if (c2=='s') { result='1';}

    }
    if (c1=='p') {
        if (c2=='r') {result='1';}
        if (c2=='p') {result='T';}
        if (c2=='s') {result='2';}
}
if (c1=='s') {
    if (c2=='r') {result='2';}
    if  (c2=='p') {result='1';}
    if  (c2=='s') {result='T';}
}
cout<<result;


}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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;
        cin >> x >> y;
        if ( x == y){cout<<"T"<<endl;}
        else if (x == 'r'&& y=='p') cout <<"2";
        else if (y == 'r'&& x=='p') cout <<"1";
        else if (x == 'r'&& y=='s') cout <<"1";
        else if (x == 's'&& y=='r') cout <<"2";
        else if (x == 'p'&& y=='s') cout <<"2";
        else if (y == 'p'&& x=='s') cout <<"2";
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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;
cin >>a;
char b;
cin >> b;
if (a == 'r' && b == 'r') cout << "T" << endl;
else if (a == 's' && b == 'p') cout << "1" << endl;
else if (a == 'r' && b == 'p') cout << "2" << endl;
else if (a == 'r' && b == 's') cout << "1" << endl;
else if (a == 's' && b == 's') cout << "T" << endl;
else if (a == 'p' && b == 'p') cout << "T" << endl;
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: B
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>
void win(char a, char b){
    if(a!=b){
    if(a=='r'){
        if(b=='s') {cout<< "1"<<endl;}
        else if(b=='p'){ cout<<"2"<<endl;}
    }
         else if(a=='p'){
        if(b=='r') {cout<< "1"<<endl;}
        else if (b=='s'){cout<<"2"<<endl;}
          }
      else if(a=='s'){
        if(b=='p'){ cout<< "1"<<endl;}
        else if (b=='r') {cout<<"2"<<endl;}
      }
    }
      else {cout<<"T"<<endl;}
}
main_program{
    char a;
    char b;
    cin>>a>>b;
    win(a,b);
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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 == b)
       { cout<<"T";}
     else if((a == 'r' && b == 'p') || (a == 's' && b == 'r') || (a == 'p' && b == 's'))
 cout<<"2";
    else if()
        {cout<<"1";}
}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
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==b)
 {
    cout<<"T";
 }
 else if((a=='r'&& b=='s') || (a=='s'&& b=='p') || (a=='p' && b=='r'))
 {
    cout<<"1";
 }
 else
 {
    cout<<"2";
 }

}

Grading criterion: Comparing for player 1 and 2 win
Rating A: correctly compares all cases of player 1 winning.
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A