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 c,d;
    cin>>c>>d;
    if( c=='p'&& d=='p'|| c=='s'&&d=='s'|| c=='r'&& d=='r')
    cout<<"T";
    if( c=='r'&& d=='p' || c=='s' && c=='r' || c=='p'&& c=='s')
    cout<<"2";
    if( c=='s'&& d=='p'|| c=='r' && c=='s'|| c=='s'&& c=='p')
    cout<<"1";

}

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>
main_program
{
    char p1;
    cin>>p1;
    char p2;
    cin>>p2;
    if(p1=='r'&&p2=='p')
    {
        cout<<2;
    }
    else if(p1=='r'&&p2=='s')
    {
        cout<<1;
    }
    else if(p1=='p'&&p2=='s')
    {
        cout<<2;
    }
    else if(p1=='p'&&p2=='r')
    {
        cout<<1;
    }
    else if(p1=='s'&&p2=='r')
    {
        cout<<2;
    }
    else if(p1=='s'&&p2=='p')
    {
        cout<<1;
    }
    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<iostream>
using namespace std;
int main(){
    char ch1;
    char ch2;
    cin>>ch1;
    cin>>ch2;
    if(ch1=='s'&&ch2=='p')
    cout<<"1";
   else if(ch1=='r'&&ch2=='p')
    cout<<"2";
    else if(ch1=='r'&& ch2=='s')
    cout<<"1";
    else if(ch1=='p'||'r'||'s'&&ch2=='p'||'r'||'s')
    cout<<"T";
    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 c1,c2; //(c1 for choice of player 1 and c2  for player 2)
cin>>c1>>c2;
if(c1==c2){if(c1=='s'|| c1=='r'|| c1=='p'){
    cout<<"T"<<endl;}
else {cout<<"invalid input"<<endl;}
}
    else if (c1!=c2){
        if(c1=='r' && c2=='s'){
            cout<<"1"<<endl;
        }
      else  if(c1=='p' && c2=='r'){
            cout<<"1"<<endl;
        }
       else if(c1=='s' && c2=='p'){
            cout<<"1"<<endl;
        }
        else if(c1=='p' && c2=='s'){
            cout<<"2"<<endl;
        }
        else if(c1=='r' && c2=='p'){
            cout<<"2"<<endl;
        }
        else if(c1=='s' && c2=='r'){
            cout<<"2"<<endl;
        }
    else{cout<<"invalid input"<<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 i1,i2; //input of player 1 and player 2 

    cin>>i1>>i2;

    if(i1==i2)  //if tie
    {
        cout<<"T";
    }

    else if ((i1=='r'&& i2=='s')||(i1=='s'&& i2=='p')||(i1=='p'&& i2=='r'))  //if p1 wins
    {
        cout<<"1";
    }
    else if ((i2=='r'&& i1=='s')||(i2=='s'&& i1=='p')||(i2=='p'&& i1=='r'))  //if p2 wins
    {
        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 ro = 'r';                                         
    char sc = 's';
    char pa = 'p';
    char x ;
    char y ;
    cin>>x;
    cin>>y;
    if(x==ro && y==sc)
    {
        cout<<"1";
    }
    else if(x==ro && y==pa) 
    {
        cout<<"2";
    }
    else if(x==pa && y==ro) 
    {
        cout<<"1";
    }
    else if(x==pa && y==sc) 
    {
        cout<<"2";
    }
    else if(x==sc && y==pa) 
    {
        cout<<"1";
    }
    else if(x==sc && y==ro) 
    {
        cout<<"2";
    }
    else
    {
        cout<<"T";
    }
}

// Character: char ch = 'a';

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

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 checkwin(char x, char y){
    if (x == y) return 3;
    if (x == 'p' && y == 'r'){
        return 1;
    }
    else if (x == 'p' && y == 's'){
        return 2;
    }
    else if (x == 'r' && y == 'p'){
        return 2;
    }
    else if (x == 'r' && y == 's'){
        return 1;
    }
    else if (x == 's' && y == 'p'){
        return 1;
    }
    else if (x == 's' && y == 'r'){
        return 2;
    }
}
main_program{
    char p1,p2;
    cin >> p1 >> p2;
    int win = checkwin(p1,p2);
    if (win == 1) cout << '1';
    else if (win == 2) cout << '2';
    else 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;
    cin>>p1;
    char p2;
    cin>>p2;
    char p; 
    char r ; 
    char s;
    if(p1 == p2){
        cout<<"T";
    }
    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='r')){
        cout<<"2";
    }
    else if((p1=='r') &&(p2=='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:
#import<simplecpp>
main_program
{
    char c1;
    char c2;
    cin>>c1;
    cin>>c2;
    if(c1==c2)
    cout<<"T";
    else if((c1=='r'&&c2=='s')||(c1=='s'&&c2=='p')||(c1=='p'&&c2=='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==p2)
        cout<<"T"<<endl;
    else if((p1=='r' && p2=='s')||(p1=='p' && p2=='r')||(p1=='s' && p2=='p')))
        cout<<"1"<<endl;
    else
        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: 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,b;
    cin>>a>>b;
    if(a==b){
        cout<<"T"<<endl;
    }
    else if(a=='r'){
        if (b=='s'){
            cout<<1<<endl;
        }
        else{
            c
    else if(a=='p'){
        if(b=='r'){
            cout<<1<<endl;
        }
        else{
            cout<<2<<endl;
        }
    }
    else if(a=='s'){
        if(b=='p'){
            cout<<1<<endl;
        }
        else{
            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: 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 i,j;
    cin >> i >> j;
    if(i=='r'&&j=='p')cout<<"2";
    if(i=='r'&&j=='s')cout<<"1";
    if(i=='r'&&j=='r')cout<<"T";
    if(i=='p'&&j=='r')cout<<"1";
    if(i=='p'&&j=='s')cout<<"2";
    if(i=='p'&&j=='p')cout<<"T";
    if(i=='s'&&j=='p')cout<<"1";
    if(i=='s'&&j=='r')cout<<"2";
    if(i=='s'&&j=='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 c1;
    char c2;
    cin>>c1>>c2;
    if (c1=='p' && c2=='p'){
        cout<<"T"<<endl;
    }
    else if(c1=='r' && c2=='r'){
        cout<<"T"<<endl;
    }
    else if(c1=='s' && c2=='s'){
        cout<<"T"<<endl;
    }
    else if(c1=='p' && c2=='r'){
        cout<<"1"<<endl;
    }
    else if(c1=='p' && c2=='s'){
        cout<<"2"<<endl;
    }
    else if(c1=='r' && c2=='p'){
        cout<<"2"<<endl;
    }
    else if(c1=='r' && c2=='s'){
        cout<<"1"<<endl;
    }
    else if(c1=='s' && c2=='p'){
        cout<<"1"<<endl;
    }
    else if(c1=='s' && c2=='r'){
        cout<<"2"<<endl;
    }
    else{
        cout<<"invalid input"<<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==p2){
        cout<<"T";
        p1='a';
    }
    if(p1=='r'){
        cout<<(p2=='s'? "1":"2");
    }
    if(p1=='p'){
        cout<<(p2=='r'? "1":"2");
    }
    if(p1=='s'){
        cout<<(p2=='p'?"1":"2");
    }
}

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