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, input_number;
cin>>input_number;
x=input_number;

repeat(100) {
x=(x+(input_number/x))/2;
}

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

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 estimated square root
	cin>>x;
	
	repeat(1000){
			x=(x+input_number/x)/2.0;}
	cout<<fixed;
	cout.precision(3);
	cout<<x;}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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/2;			//initial estimate
	while(abs(x*x-input_number)>1.0e-5){
		x=(x+input_number/x)/2;		//using The Babylonian Algorithm
	}
	cout << fixed;
	cout.precision(3);
	cout << x <<endl;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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>
double nxt(double x, double y){
	return (x+y/x)/2;
}
main_program{
	double y;
	cin>>y;
	double x=1;
	while(abs(x-nxt(x,y))>=0.0001){
		x=nxt(x,y);
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x<<endl;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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; cin>> input;
	float x=1;

	while(abs(x*x-input)>0.001){
		x= (x+input/x)*(0.5);
	}
	
	cout<<fixed;
	cout.precision(3);
	cout<< x;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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>0,y;
	cin>>x;

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 x=1,y;
	cin>>y;
	repeat(1000){
		x=(x+y/x)/2;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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, x;
	cin>>input;
	x=input;
	while((x*x-input)>0.00001){
		x=(x+input/x)/2;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 x;
	cin>>x;
	float root=x;
	repeat(100)
	{
		root=(root+x/root)/2.0;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<root;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 y, x = 1;
	cin >> y;
	repeat(10) {
		x = (x+y/x)/2.0;
	}
	cout << fixed;
	cout.precision(3);
	cout << x;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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, 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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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,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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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, 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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 a;
	cin>>a;
	float x=a;
	while(x!=sqrt(a)){
		x=(x+(a/x))/2;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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>
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 y;
	cin>>y;
	float x=1;
	repeat(100){
		x=(x+y/x)/2;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x<<endl;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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,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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 xi,n;
	cin >> n;
	xi = 1;
	repeat(10){
		xi = (xi + n/xi)/2;
	}
	cout << fixed;
	cout.precision(3);
	cout << xi<<endl;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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(10000){
		x= (x+input_number/x)/2;
	}
	cout<<fixed;
	cout.precision(3);
	cout<< x;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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=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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 x,in;
	cin >> in;
	x=in;
	repeat(10){
		x=(x+(in/x))/2;
	}
	cout <<fixed;
	cout.precision(3);
	cout << x;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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 x;
   cin>>x;
   float sqrt=x;
   repeat(10){
    sqrt = (sqrt +( x/sqrt))/2;
   }
   cout<<fixed;
   cout.precision(3);
   cout<<sqrt;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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<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: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
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;
	repeat(10000){
		x=((x+a/x)/2);
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x<<endl;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B