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>
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: 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 == 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: 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==b)
 {
    cout<<"T";
 }
 else if((a=='r'&& b=='s') || (a=='s'&& b=='p') || (a=='p' && b=='r'))
 {
    cout<<"1";
 }
 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
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')cout<<"1";
    else if(p1=='s'&p2=='r') cout<<"2";
    else if(p1=='r'&p2=='p') cout<<"2";
    else if(p1=='p'&p2=='r') cout<<"1";
    else if(p1=='p'&p2=='s') cout<<"2";
    else if(p1=='s'&p2=='p') cout<<"1";
    else if(p1=='s'&p2=='s') cout<<"T";
    else if(p1=='r'&p2=='r') cout<<"T";
    else if(p1=='p'&p2=='p') 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;
    

    if (a+b) 
        cout << "T"; 

        else 
        if ((a=p && b=p))
        cout << "T"

        else
    if ( (a=p) && (b=p)) 
        cout <<"1"; 

        else
    if ( (a=r) && (b=p) ) 
     cout <<"1"; 

     else
     if  ( (a=r && b=p) ) 
     cout << "2"; 
     
     else 
     if ( (a=s) && (b=p))
    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 {
    char r ,s;
    char p1 ,p2

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<simplecpp>
main_program{
    char r,p,s;
    char input1,input2;
    cin>>input1>>input2;

if(input1=='r',input2=='s'){
    cout<<"1";
}
else if (input1=='s', input2=='r') {
    cout<<"2";
}  
else if (input1=='r', input2=='r'){
    cout<<"T";
}
if(input1=='s',input2=='p'){
    cout<<"1";
}
else if (input1=='p', input2=='s') {
    cout<<"2";
}  
else if (input1=='s', input2=='s'){
    cout<<"T";
}
if(input1=='p',input2=='r'){
    cout<<"1";
}
else if (input1=='r', input2=='p') {
    cout<<"2";
}  
else if (input1=='p', input2=='p'){
    cout<<"T";
}
}

Grading criterion: Output
Rating A: correctly prints the output
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 func(char r; char s; char; p){
    if(r>s){
        cout<<"1";
    }
    else if(p>r){
        cout<<"1";
    }
    else if(p>r){
        cout<<"1";
    }
    else if(p=r|| r=s|| p=s)
    cout"T";
    }
    else
    cout"0"
}
int main(){
    char x,y,;
    cin>>p1;
    cin>>p2;
    
    
}

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<simplecpp>
main_program{
    char first,second;
    cin>>first>>second;
    if(first=='p'&&second=='r'||first=='s'&&second=='p'||first=='r'&&second=='s')cout<<"1";
    else if(first=='r'&&second=='p'||first=='p'&&second=='s'||first=='s'&&second=='r')cout<<"2";
    else if(first=='r'&&second=='r'||first=='p'&&second=='p'||first=='s'&&second=='s')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,p2;
    cin>>p1>>p2;
    if ((p1=='r'&&p2=='s')||(p1=='s'&&p2=='p')||(p1=='p'&&p2=='r')){
        cout << 1<<endl;
    }else if ((p2=='r'&&p1=='s')||(p2=='s'&&p1=='p')||(p2=='p'&&p1=='r')){
        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 p,r,s;
 char char1,char2;
 cin>>char1>>char2;
 if (char1==char2)
 cout<<"T";
 else if (char1=='r' && char2=='p')
 {cout<<"2";}
 else if (char1=='r' && char2=='s')
 cout<<"1";
 else if (char1=='s' && char2=='r')
 cout<<"2";
 else if (char1=='s' && char2=='p')
 cout<<"1";
 else if (char1=='p' && char2=='s')
 cout<<"2";
 else if (char1=='p' && char2=='r')
 cout<<"1";
 return 0;
}

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 k;
    char l;
    cin >> k >>l;
    if ( k== 'r' && l== 'p') { cout << "2";}
        else if ( k== 'r' && l== 's') { cout << "1";}
        else if (k== 'r' && l== 'r') { cout << "T";}
     else if ( k== 'p' && l== 'p') { cout << "T" ;}
        else if ( k== 'p' && l== 'r') { cout << "1";}
        else if ( k== 'p' && l== 's') { cout << "2";}
    else if ( k== 's' && l== 'p') { cout << "1";}
        else if (k== 's' && l== 'r') { cout << "2";}
        else if (k== 's' && l== 's') { 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>>b;
    if(a==b) cout<<"T";
    else if ((a=='p' && b=='r') || b=='p' && a=='r'){
        if(a=='p') cout<<"1";
        else cout<<"2";
    }
    else if ((a=='s' && b=='p') || b=='s' && a=='p'){
        if(a=='s') cout<<"1";
        else cout<<"2";
    }
    else if ((a=='r' && b=='s') || b=='r' && a=='s'){
        if(a=='r') cout<<"1";
        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
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 r;
    char p;
    char s;
    char T;
    char a;
    char b;
    cin>>a;
    cin>>b;
    if(a=='r' && b=='s' || a=='p' && b=='r' || a=='s' && b=='p')
    cout<<"1";
    else if(a=='r' && b=='r'|| a=='p' && b=='p' || a=='s' && b=='s')
    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
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 m,n;
    cin>>m>>n;
    if(m==n){cout<<"T";}
    else if(m=='p'&&n=='r'){cout<<"1";}
    else if(m=='p'&&n=='s'){cout<<"2";}
    else if(m=='r'&&n=='p'){cout<<"2";}
    else if(m=='r'&&n=='s'){cout<<"1";}
    else if(m=='s'&&n=='p'){cout<<"1";}
    else if(m=='s'&&n=='r'){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>
int fight(char c1,char c2){
    if (c1==c2) return 0;
    else if (c1=='r' && c2=='p') return 2;
    else if (c1=='p' && c2=='s') return 2;
    else if (c1=='s' && c2=='r') return 2;
    else return 1;
}
main_program{
    char c1,c2;
    cin>>c1>>c2;
    if (fight(c1,c2)==0) cout<<'T';
    else if(fight(c1,c2)==1) cout<<1;
    else if(fight(c1,c2)==2) 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