CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program
{
	float x;
	cin>>x;
	float root=x;
	repeat(100)
	{
		root=(root+x/root)/2.0;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<root;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include <simplecpp>

main_program {
	float y, x = 1;
	cin >> y;
	repeat(10) {
		x = (x+y/x)/2.0;
	}
	cout << fixed;
	cout.precision(3);
	cout << x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program {
	float c ,x, t;

	
	cin >> c ;
	x = c ;
	repeat (1000) {
		t =( ( x + c/x)/2);
		x = t ;
	}
	cout << fixed ;
	cout.precision(3);
	cout << x ;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	double x, input - number;
		cin >> input-number;
		x = input-number;
	repeat(1000){
		x = (x + input-number/x)/2;}
		cout << fixed;
		cout << precision(3);
		cout << x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float n;
	cin>>n;
	float x=n;
	repeat(100){
		x=(x+n/x)/2;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program  {
	float input_number,x;
	cin>>input_number;
	x=input;
	while(abs(x*x-input_number)>=0.001) {
	   x=((x+input_number)/x)/2.0;
	        }
	cout<<fixed;
	cout.precision(3);
	cout<<x<<endl;
	      }

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include <simplecpp>
main_program{
    float num;
    cin >> num >> endl;

    for(int x=1;x<=num;x++){
        answer=(x+num/x)/2;
        }
    cout << answer << endl;
    }

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include <simplecpp>
main_program{
	float input_number, x;
	cin >> input_number;
	x = input_number;

        if (){
		x = (x + input_number/x) / 2;
		input_number = x;
	}	
	cout << fixed;
	cout.precision(3);
	cout << x;

	//for, while, if, else
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float input_number;
	cin>>input_number;
	float x;
	x=input_number;
	repeat(100){
	x=(x+input_number/x)/2;
	}
cout<<fixed;
cout.precision(3);
cout<<x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
		
	main_program{

		float x1 = 1;
		float x2 = 0;
		float a ;
		cin>>a ;

		while (abs(pow(a,0.5)-x1)>0.001){

			x2 = x1 - (x1*x1-a)/2*x1;
			x1 = x2 ;

		}

		cout<<fixed;
		cout.precision(3);
		cout<<x1;
	}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float input_number;
	cin>>input_number;
	float x=input_number;
	repeat(8){
		x=(x+input_number/x)/2;
	}
	cout<<fixed;
	
	cout.precision(3);
	cout<<x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float x,sqrt;
	cin>>x;
	sqrt=x;

	for (float n=0;abs(n-sqrt)>0.001;){
		n=sqrt;
		sqrt=(sqrt+(x/sqrt))/2;	
	}

	cout<<fixed;
	cout.precision(2);
	cout<<sqrt<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	double x=1;
	double n;
	cin >>n;
	repeat(100){
		x=(x+(n/x))/2;
	}
	cout <<fixed;
	cout.precision(3);
	cout <<x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float a;
	cin>>a;
	float x=a;
	while(x!=sqrt(a)){
		x=(x+(a/x))/2;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
float root(float a){
	float x=a/2;
	double i=0;
	while(i<100){
		x=(x+a/x)/2;
		i+=1;
	}
	return x;
}
main_program{
	float a,b;
	cin>> a;
	b=root(a);
	cout<<fixed;
	cout.precision(3);
	cout<<b;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float y;
	cin>>y;
	float x=1;
	repeat(100){
		x=(x+y/x)/2;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include <simplecpp>
main_program
{
	float a;
	cin>>a;
	float xn=a; //initial approximation
	float epsilon=0.001;

	while (abs(a-xn*xn)>epsilon)
	{
		xn=(xn+(a/xn))/2;
	
	}
	cout<<fixed;
	cout.precision(3);
	cout<<xn;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float n,x;
cin>>n;
x=n;
for(int i=1;i<=25;i++){
	x=(x+(n/x))/2;
}
cout<<fixed;
cout.precision(3);
cout<<x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float xi,n;
	cin >> n;
	xi = 1;
	repeat(10){
		xi = (xi + n/xi)/2;
	}
	cout << fixed;
	cout.precision(3);
	cout << xi<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float input_number;
	cin>> input_number;

	float x= input_number;
	repeat(10000){
		x= (x+input_number/x)/2;
	}
	cout<<fixed;
	cout.precision(3);
	cout<< x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float n;
	cin >> n;
	float x = 0;
	x = n;
	repeat(100){
		x = (x + (n/x))/2;
	}
	cout << fixed;
	cout.precision(3);
	cout << x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program
{
	 float input_number=0;
	 cin>>input_number;
	 float x= input_number;
	 repeat(100)
	 {
		 x=(x*x+input_number)/(2.0*x);
	 }
	 cout<<fixed;
	 cout.precision(3);
	 cout<<x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{ float x,inpnum;
	       cin>>inpnum;
	       x=inpnum;
	       repeat(1000){

		    x= ( x+ inpnum/x)/2;
	       }
	     
		cout<<fixed;
		cout.precision(3);
		cout<<x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
	float x,in;
	cin >> in;
	x=in;
	repeat(10){
		x=(x+(in/x))/2;
	}
	cout <<fixed;
	cout.precision(3);
	cout << x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<simplecpp>
main_program{
   float x;
   cin>>x;
   float sqrt=x;
   repeat(10){
    sqrt = (sqrt +( x/sqrt))/2;
   }
   cout<<fixed;
   cout.precision(3);
   cout<<sqrt;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that implements the Babylonian Algorithm to approximate the square root of any given positive real number. The program should take a floating-point value as input and print the final approximation of the square root rounded to three digits after the decimal point.

Student submission:
#include<iostream>
using namespace std;
int main(){

float input_number; 
cin>>input_number;

float x;
x= input_number;
for (int i= 0; i<100; i++){
x= float(x + float(input_number)/float(x))/2.0;
}

cout << fixed; // uses fixed floating point representation
cout.precision(3); // print two digits after the decimal point
cout<<x;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A