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

}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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"<< endl;
    }
    else if(a=='r' && b=='s' || a=='p' && b=='r' || a=='s' && b=='p')
    {
        cout<< "1" <<endl;
    }
    else {
        cout<<"2"<< endl;
    }
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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=='p' && p2=='r')
    {
        cout<<"1";
    }

    else if(p1=='r' && p2=='p')
    {
        cout<<"2";
    }

    else if(p1=='r' && p2=='s')
    {
        cout<<"1";
    }

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

    else if(p1=='p' && p2=='s')
    {
        cout<<"2";
    }

    else
    {
        cout<<"T";
    }
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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,p,s;
    if ( (p r) || (s p) || (r s))
    {cout << 1 <<endl};
    if ((r p) || (p s) || (s r))
    {cout << 2 << endl};
    if ( (r r) || (p p) || (s s))
    {cout << "T"};
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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 a,b;
    cin>>a>>b;
    if(a=='r'&& b=='s') cout<<"1";
    if(a=='s'&& b=='p') cout<<"1";
    if(a=='p'&& b=='r') cout<<"1";
    if(a=='s'&& b=='r') cout<<"2";
    if(a=='p'&& b=='s') cout<<"2";
    if(a=='r'&& b=='p') cout<<"2";
if(a==b)cout<<"T";



}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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=='r' && p2=='r'){
        cout<<"T";
    }
    if(p1=='s' && p2=='s'){
        cout<<"T";
    }
    if(p1=='p' && p2=='p'){
        cout<<"T";
    }
    if(p1=='r' && p2=='s'){
        cout<<"1";
    }
    if(p1=='r' && p2=='p'){
        cout<<"2";
    }
    if(p1=='p' && p2=='r'){
        cout<<"2";
    }
    if(p1=='p' && p2=='s'){
        cout<<"1";
    }
    if(p1=='s' && p2=='r'){
        cout<<"2";
    }
    if(p1=='s' && p2=='p'){
        cout<<"1";
    }
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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' << endl;
    }
        
    else {
        if ((a == 'r' && b == 's') || (a == 's' && b == 'p') || (a == 'p' && b == 'r')) {
            cout << '1' << endl;
        }
        else {
            cout << '2' << endl;
        }
    }

}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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;
    // r stands for rock, p for paper & s for scissor
    if ((a=='r' && b=='s') || (a=='p' && b=='r') || (a=='s' && b=='p'))
    cout<<1;
    else if ((a=='r' && b=='p') || (a=='p' && b=='s') || (a=='s' && b=='r'))
    cout<<2;
    else 
    cout<<"T";
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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,t,P1,P2 ;
    cin>>P1>>P2;
    if (P1=='r'&&P2=='s')
    cout<<"1"<<endl;
    else if (P1=='r'&&P2=='p')
    cout<<"2"<<endl;
    else if (P1=='s'&&P2=='r')
    cout<<"2"<<endl;
    else if (P1=='s'&&P2=='p')
    cout<<"1"<<endl;
    else if (P1=='p'&&P2=='s')
    cout<<"2"<<endl;
    else if (P1=='p'&&P2=='r')
    cout<<"1"<<endl;
    else 
    cout <<"T"<<endl;
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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=='s' && c2=='p')cout<<"1";
    else if(c1=='p' && c2=='r')cout<<"1";
    else if(c1=='r' && c2=='s')cout<<"1";
    else if(c2=='s' && c1=='p')cout<<"2";
    else if(c2=='p' && c1=='r')cout<<"2";
    else if(c2=='r' && c1=='s')cout<<"2";
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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;
    cin >> c2;
    if(c1 == 'r')
    {
        if(c2 == 'r')
        {
            cout << "T" << endl;
        }
        else if(c2 == 'p')
        {
            cout << "2" << endl;
        }
        else if(c2 == 's')
        {
            cout << "1" << endl;
        }
    }
    else if(c1 == 'p')
    {
       if(c2 == 'r')
        {
            cout << "1" << endl;
        }
        else if(c2 == 'p')
        {
            cout << "T" << endl;
        }
        else if(c2 == 's')
        {
            cout << "2" << endl;
        }
    }
    else if(c1 == 's')
    {
       if(c2 == 'r')
        {
            cout << "2" << endl;
        }
        else if(c2 == 'p')
        {
            cout << "1" << endl;
        }
        else if(c2 == 's')
        {
            cout << "T" << endl;
        }  
    }
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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 == 'r')
    { if (input2 == 'r') cout << "T";
    else if (input2 == 'p') cout << "2";
    else if (input2 == 's') cout << "1";}
    else if (input1 == 'p')
    {if (input2 == 'r') cout << "1";
    else if (input2 == 'p') cout << "T";
    else if (input2 == 's') cout << "2";}
    else if (input1 == 's'){
if (input2 == 'r') cout << "2";
else if (input2 == 'p') cout << "1";
else if (input2 == 's') cout << "T";}
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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=='r') || (a=='s' && b=='s') || (a=='p' && b=='p')){cout<<"T"<<endl;}
        else if(a=='p' && b=='r'){cout<<"1"<<endl;}
        else if(a=='p' && b=='s'){cout<<"2"<<endl;}
        else if(a=='r' && b=='p'){cout<<"2"<<endl;}
        else if(a=='r' && b=='s'){cout<<"1"<<endl;}
        else if(a=='s' && b=='p'){cout<<"1"<<endl;}
        else if(a=='s' && b=='r'){cout<<"2"<<endl;}
    }

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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;
    }
    if(p1== 'r' && p2=='s'){
        cout<<"1 "<<endl;
    }
    if(p1=='s' && p2=='r'){
        cout<<"2 "<<endl;
    }
    if(p1=='s' && p2=='p'){
        cout<<"1"<<endl;
    }
    if(p1=='p' && p2=='s'){
        cout<<"2 "<<endl;
    }
    if(p1=='p' && p2=='r'){
        cout<<"1"<<endl;
    }
    if(p1=='r' && p2=='p'){
        cout<<"2"<<endl;
    }
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
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 ch1, ch2;
//     cin>>ch1>>ch2;

//     if((ch1=='p') $$ (ch2=='P')){
//         cout<<"T";
//     } else if((ch1=='r') $$ (ch2=='p')){
//         cout<<"2";
//     } else if((ch1=='s') $$ (ch2=='P')){
//         cout<<"1";
//     }
    
// }
char x, y;
char p,s, r;
cin>>x>>y;
if(x=='p' && y=='p' || x=='r'  && y=='p' || x=='s'){
    cout<<"T";
} else if(x=='s' && y=='p' || x=='s'  && y=='p' ){
    cout<<"1";
} else if(x=='r' && y=='p' || x=='p'  && y=='s' ){
    cout<<"2";
} 
}

Grading criterion: Accepting input
Rating A: correctly accepts two characters as input
Rating B: Some issue.
Rating C: Major issue.
Rating D: 0
Assigned grade: A