id
stringlengths
16
16
language
stringclasses
3 values
category
stringclasses
38 values
question
stringlengths
2
1.96k
answer
stringlengths
1
1.46k
messages
listlengths
2
2
teacher
stringclasses
5 values
batch
stringclasses
20 values
source
stringclasses
677 values
used_in_chat
stringclasses
3 values
tokens
int64
8
849
b78295c4a77eef66
en
code_c
c program to check if a word is palindrome pls
This program reads a word and says whether it is a palindrome. ```c #include <stdio.h> #include <string.h> int main(void) { char word[100]; printf("Enter a word: "); if (scanf("%99s", word) != 1) { return 0; } int len = (int)strlen(word); int is_pal = 1; for (int i = 0; i < len / 2;...
[ { "role": "user", "content": "c program to check if a word is palindrome pls" }, { "role": "assistant", "content": "This program reads a word and says whether it is a palindrome.\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main(void) {\n char word[100];\n printf(\"Enter a word: \...
beam-free
qa-v1
train
263
80ca6c817d7ce570
en
code_c
c helo world pls
This program prints a greeting. ```c #include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; } ``` Compile it with gcc and run it. It prints Hello, world! on one line.
[ { "role": "user", "content": "c helo world pls" }, { "role": "assistant", "content": "This program prints a greeting.\n```c\n#include <stdio.h>\n\nint main(void) {\n printf(\"Hello, world!\\n\");\n return 0;\n}\n```\nCompile it with gcc and run it. It prints Hello, world! on one line." }...
beam-free
qa-v1
train
72
54822bf0210c3d4b
en
code_c
print fibonacci sequence in c
This program prints the first 10 Fibonacci numbers. ```c #include <stdio.h> int main(void) { int a = 0; int b = 1; for (int i = 0; i < 10; i++) { printf("%d\n", a); int next = a + b; a = b; b = next; } return 0; } ``` Compile and run it. It prints 0, 1, 1, 2, 3, 5, ...
[ { "role": "user", "content": "print fibonacci sequence in c" }, { "role": "assistant", "content": "This program prints the first 10 Fibonacci numbers.\n```c\n#include <stdio.h>\n\nint main(void) {\n int a = 0;\n int b = 1;\n\n for (int i = 0; i < 10; i++) {\n printf(\"%d\\n\", a)...
beam-free
qa-v1
train
157
6f3189e5b714d7d5
en
code_c
write a C program that reverses an array
This program prints the five numbers in reverse order. ```c #include <stdio.h> int main(void) { int a[] = {1, 2, 3, 4, 5}; int n = 5; for (int i = n - 1; i >= 0; i--) { printf("%d ", a[i]); } printf("\n"); return 0; } ``` Compile it with gcc and run it. It prints 5 4 3 2 1.
[ { "role": "user", "content": "write a C program that reverses an array" }, { "role": "assistant", "content": "This program prints the five numbers in reverse order.\n```c\n#include <stdio.h>\n\nint main(void) {\n int a[] = {1, 2, 3, 4, 5};\n int n = 5;\n\n for (int i = n - 1; i >= 0; i-...
beam-free
qa-v1
train
146
6dd3eb44deab3937
en
code_c
swap two numbers with pointers in C pls
This program reads two numbers, swaps them with a pointer function, and prints the result. ```c #include <stdio.h> void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } int main(void) { int x, y; printf("Enter two numbers: "); if (scanf("%d %d", &x, &y) != 2) { return 1; ...
[ { "role": "user", "content": "swap two numbers with pointers in C pls" }, { "role": "assistant", "content": "This program reads two numbers, swaps them with a pointer function, and prints the result.\n\n```c\n#include <stdio.h>\n\nvoid swap(int *a, int *b) {\n int temp = *a;\n *a = *b;\n ...
beam-free
qa-v1
train
199
4c49885164a62aef
en
code_c
can you make a c program to print fibonacci sequence
This program prints the first 10 Fibonacci numbers. ```c #include <stdio.h> int main(void) { int n = 10; int a = 0, b = 1; for (int i = 0; i < n; i++) { printf("%d ", a); int next = a + b; a = b; b = next; } printf("\n"); return 0; } ``` Compile and run it; it pr...
[ { "role": "user", "content": "can you make a c program to print fibonacci sequence" }, { "role": "assistant", "content": "This program prints the first 10 Fibonacci numbers.\n```c\n#include <stdio.h>\n\nint main(void) {\n int n = 10;\n int a = 0, b = 1;\n for (int i = 0; i < n; i++) {\n...
beam-free
qa-v1
train
165
e8b502500fd83f15
en
code_c
sum of 1 to n in c, how?
This program reads n and prints the sum of the numbers from 1 to n. ```c #include <stdio.h> int main(void) { int n; if (scanf("%d", &n) != 1) { return 1; } long sum = (long)n * (n + 1) / 2; printf("%ld\n", sum); return 0; } ``` I tested it with the input "10", and it prints 55.
[ { "role": "user", "content": "sum of 1 to n in c, how?" }, { "role": "assistant", "content": "This program reads n and prints the sum of the numbers from 1 to n.\n```c\n#include <stdio.h>\n\nint main(void) {\n int n;\n\n if (scanf(\"%d\", &n) != 1) {\n return 1;\n }\n\n long s...
beam-free
qa-v1
train
137
ed99d1aa7279f9e9
en
code_c
write a c program that shows how pointers work
This program stores a number, points to it, and changes it through the pointer. ```c #include <stdio.h> int main(void) { int x = 42; int *p = &x; printf("x = %d\n", x); printf("*p = %d\n", *p); *p = 7; printf("after *p = 7, x = %d\n", x); return 0; } ``` Compile it with gcc -std=c11 -Wall...
[ { "role": "user", "content": "write a c program that shows how pointers work" }, { "role": "assistant", "content": "This program stores a number, points to it, and changes it through the pointer.\n```c\n#include <stdio.h>\n\nint main(void) {\n int x = 42;\n int *p = &x;\n\n printf(\"x =...
beam-free
qa-v1
train
169
aba191b14902d1ab
en
code_c
c code to print the ascii code of a character
This program reads one character and prints its ASCII code. ```c #include <stdio.h> int main(void) { char c; printf("Enter a character: "); if (scanf(" %c", &c) != 1) { printf("Invalid input.\n"); return 1; } printf("ASCII code of '%c' is %d.\n", c, (int)c); return 0; } ``` Ru...
[ { "role": "user", "content": "c code to print the ascii code of a character" }, { "role": "assistant", "content": "This program reads one character and prints its ASCII code.\n```c\n#include <stdio.h>\n\nint main(void) {\n char c;\n\n printf(\"Enter a character: \");\n if (scanf(\" %c\"...
beam-free
qa-v1
train
152
3ef3bbbb96a8f81f
en
code_c
can u print fibonacci in c pls
This program prints the first 10 Fibonacci numbers. ```c #include <stdio.h> int main(void) { int n = 10; int a = 0, b = 1, next; printf("First %d Fibonacci numbers:\n", n); for (int i = 0; i < n; i++) { printf("%d ", a); next = a + b; a = b; b = next; } printf("...
[ { "role": "user", "content": "can u print fibonacci in c pls" }, { "role": "assistant", "content": "This program prints the first 10 Fibonacci numbers.\n```c\n#include <stdio.h>\n\nint main(void) {\n int n = 10;\n int a = 0, b = 1, next;\n\n printf(\"First %d Fibonacci numbers:\\n\", n)...
beam-free
qa-v1
validation
199
5aae1875e30d1127
en
code_c
c program that prints ascii value of a char
This program reads one character and prints its ASCII code. ```c #include <stdio.h> int main(void) { char c; printf("Enter a character: "); if (scanf(" %c", &c) != 1) { printf("Invalid input.\n"); return 0; } printf("ASCII code of '%c' is %d.\n", c, (int)c); return 0; } ``` Run ...
[ { "role": "user", "content": "c program that prints ascii value of a char" }, { "role": "assistant", "content": "This program reads one character and prints its ASCII code.\n```c\n#include <stdio.h>\n\nint main(void) {\n char c;\n printf(\"Enter a character: \");\n if (scanf(\" %c\", &c...
beam-free
qa-v1
train
156
5d0691af05b2af5f
en
code_c
count down from 10 to 1 in c
This program counts from 10 down to 1. ```c #include <stdio.h> int main(void) { for (int i = 10; i >= 1; i--) { printf("%d\n", i); } return 0; } ``` It needs no input and prints the numbers 10 to 1, one per line.
[ { "role": "user", "content": "count down from 10 to 1 in c" }, { "role": "assistant", "content": "This program counts from 10 down to 1.\n```c\n#include <stdio.h>\n\nint main(void) {\n for (int i = 10; i >= 1; i--) {\n printf(\"%d\\n\", i);\n }\n\n return 0;\n}\n```\nIt needs no ...
beam-free
qa-v1
train
104
2db5b5afeb097f80
en
code_c
can you reverse a string in C
This program reads a line and prints it reversed. ```c #include <stdio.h> #include <string.h> int main(void) { char s[256]; if (fgets(s, sizeof s, stdin) == NULL) { return 0; } size_t n = strlen(s); if (n > 0 && s[n - 1] == '\n') { s[n - 1] = '\0'; n--; } for (size_t...
[ { "role": "user", "content": "can you reverse a string in C" }, { "role": "assistant", "content": "This program reads a line and prints it reversed.\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main(void) {\n char s[256];\n if (fgets(s, sizeof s, stdin) == NULL) {\n return ...
beam-free
qa-v1
train
253
f05a6c5aa2d6f4e6
en
code_c
copy one string into another without strcpy in C
This program reads text and copies it into a second string by hand. ```c #include <stdio.h> int main(void) { char src[100]; char dest[100]; int i = 0; printf("Text: "); if (fgets(src, sizeof(src), stdin) == NULL) { return 0; } while (src[i] != '\0') { dest[i] = src[i]; ...
[ { "role": "user", "content": "copy one string into another without strcpy in C" }, { "role": "assistant", "content": "This program reads text and copies it into a second string by hand.\n```c\n#include <stdio.h>\n\nint main(void) {\n char src[100];\n char dest[100];\n int i = 0;\n\n ...
beam-free
qa-v1
train
200
ee198f3d0addb957
en
code_c
gcd in c two numbers
This program reads two integers and prints their greatest common divisor. ```c #include <stdio.h> int gcd(int a, int b) { while (b != 0) { int t = b; b = a % b; a = t; } return a; } int main(void) { int a; int b; if (scanf("%d %d", &a, &b) != 2) { return 0; ...
[ { "role": "user", "content": "gcd in c two numbers" }, { "role": "assistant", "content": "This program reads two integers and prints their greatest common divisor.\n```c\n#include <stdio.h>\n\nint gcd(int a, int b) {\n while (b != 0) {\n int t = b;\n b = a % b;\n a = t;\n...
beam-free
qa-v1
train
172
c6f3af7b05c516f6
en
code_c
write a c program that prints the ascii code of a char
This program reads one character and prints its ASCII code. ```c #include <stdio.h> int main(void) { char c; printf("Enter a character: "); if (scanf(" %c", &c) != 1) { return 1; } printf("ASCII code of '%c' is %d\n", c, (int)c); return 0; } ``` Save it as ascii.c, compile with gcc -s...
[ { "role": "user", "content": "write a c program that prints the ascii code of a char" }, { "role": "assistant", "content": "This program reads one character and prints its ASCII code.\n```c\n#include <stdio.h>\n\nint main(void) {\n char c;\n\n printf(\"Enter a character: \");\n if (scan...
beam-free
qa-v1
train
176
25ef0c56a8d434ba
en
code_c
find smallest number in an array c
This program looks through a fixed array and prints the smallest value. ```c #include <stdio.h> int main(void) { int nums[] = {7, 3, 9, 1, 5}; int n = sizeof(nums) / sizeof(nums[0]); int smallest = nums[0]; for (int i = 1; i < n; i++) { if (nums[i] < smallest) { smallest = nums[i]; ...
[ { "role": "user", "content": "find smallest number in an array c" }, { "role": "assistant", "content": "This program looks through a fixed array and prints the smallest value.\n```c\n#include <stdio.h>\n\nint main(void) {\n int nums[] = {7, 3, 9, 1, 5};\n int n = sizeof(nums) / sizeof(nums...
beam-free
qa-v1
train
198
c07887ddd7c22e25
en
code_c
a multiplication table in c
This program reads a number and prints its multiplication table from 1 to 10. ```c #include <stdio.h> int main(void) { int n; printf("Enter a number: "); if (scanf("%d", &n) != 1) { printf("Invalid input.\n"); return 1; } for (int i = 1; i <= 10; i++) { printf("%d x %d = %...
[ { "role": "user", "content": "a multiplication table in c" }, { "role": "assistant", "content": "This program reads a number and prints its multiplication table from 1 to 10.\n```c\n#include <stdio.h>\n\nint main(void) {\n int n;\n\n printf(\"Enter a number: \");\n if (scanf(\"%d\", &n)...
beam-free
qa-v1
train
184
249d0d0d1f6e7fc7
en
code_c
sum of numbers from 1 to n in c, reads n
This program reads n and prints the sum of the numbers from 1 to n. ```c #include <stdio.h> int main(void) { int n; printf("Enter n: "); scanf("%d", &n); long long sum = 0; for (int i = 1; i <= n; i++) { sum += i; } printf("Sum from 1 to %d: %lld\n", n, sum); return 0; } ``` ...
[ { "role": "user", "content": "sum of numbers from 1 to n in c, reads n" }, { "role": "assistant", "content": "This program reads n and prints the sum of the numbers from 1 to n.\n```c\n#include <stdio.h>\n\nint main(void) {\n int n;\n\n printf(\"Enter n: \");\n scanf(\"%d\", &n);\n\n ...
beam-free
qa-v1
train
171
bd3439141b248b42
en
code_c
write a c program that checks if a char is a letter or digit
This program checks whether a character is a letter, a digit, or neither. ```c #include <stdio.h> #include <ctype.h> int main(void) { char c; printf("Enter a character: "); if (scanf(" %c", &c) != 1) { return 0; } if (isalpha((unsigned char)c)) { printf("%c is a letter.\n", c); ...
[ { "role": "user", "content": "write a c program that checks if a char is a letter or digit" }, { "role": "assistant", "content": "This program checks whether a character is a letter, a digit, or neither.\n\n```c\n#include <stdio.h>\n#include <ctype.h>\n\nint main(void) {\n char c;\n printf...
beam-free
qa-v1
train
230
82d8d4d257c4af69
en
code_c
c calculator with switch reading two numbers and an operator
This program reads two numbers and an operator, then prints the result. ```c #include <stdio.h> int main(void) { double a, b; char op; if (scanf("%lf %c %lf", &a, &op, &b) != 3) return 0; switch (op) { case '+': printf("%.2f\n", a + b); break; case '-': printf("%.2f\n", a - b); break; ...
[ { "role": "user", "content": "c calculator with switch reading two numbers and an operator" }, { "role": "assistant", "content": "This program reads two numbers and an operator, then prints the result.\n```c\n#include <stdio.h>\n\nint main(void) {\n double a, b;\n char op;\n if (scanf(\...
beam-free
qa-v1
train
274
1c5ef77454768793
en
code_c
c struct for a point and distance between two points
This program defines a point struct and prints the distance between two points. ```c #include <stdio.h> #include <math.h> typedef struct { double x, y; } Point; int main(void) { Point p1 = {0, 0}; Point p2 = {3, 4}; double d = sqrt((p2.x-p1.x)*(p2.x-p1.x) + (p2.y-p1.y)*(p2.y-p1.y)); printf("Distance:...
[ { "role": "user", "content": "c struct for a point and distance between two points" }, { "role": "assistant", "content": "This program defines a point struct and prints the distance between two points.\n\n```c\n#include <stdio.h>\n#include <math.h>\n\ntypedef struct { double x, y; } Point;\n\nin...
beam-free
qa-v1
train
190
68fdddcf0e2ba912
en
code_c
sum numbers from 1 to n in c
This program adds the numbers from 1 to n. ```c #include <stdio.h> int main(void) { int n; printf("Enter n: "); if (scanf("%d", &n) != 1 || n < 1) { printf("Invalid n.\n"); return 0; } int sum = 0; for (int i = 1; i <= n; i++) { sum += i; } printf("Sum from 1 to ...
[ { "role": "user", "content": "sum numbers from 1 to n in c" }, { "role": "assistant", "content": "This program adds the numbers from 1 to n.\n```c\n#include <stdio.h>\n\nint main(void) {\n int n;\n printf(\"Enter n: \");\n if (scanf(\"%d\", &n) != 1 || n < 1) {\n printf(\"Invalid...
beam-free
qa-v1
train
188
894c16e5f2034a92
en
code_c
how to get average of numbers typed in c
This program asks how many numbers you have, then reads them and prints their average. ```c #include <stdio.h> int main(void) { int n, i; double sum = 0.0, value; printf("How many numbers? "); if (scanf("%d", &n) != 1 || n <= 0) { printf("Need at least one number.\n"); return 0; } ...
[ { "role": "user", "content": "how to get average of numbers typed in c" }, { "role": "assistant", "content": "This program asks how many numbers you have, then reads them and prints their average.\n```c\n#include <stdio.h>\n\nint main(void) {\n int n, i;\n double sum = 0.0, value;\n pri...
beam-free
qa-v1
train
269
5b3282a634b7f89f
en
code_c
reverse a string in c quick
This program reads a line of text and prints it reversed. ```c #include <stdio.h> #include <string.h> int main(void) { char text[100]; printf("Enter a string: "); if (!fgets(text, sizeof(text), stdin)) { return 1; } size_t length = strlen(text); if (length > 0 && text[length - 1] == ...
[ { "role": "user", "content": "reverse a string in c quick" }, { "role": "assistant", "content": "This program reads a line of text and prints it reversed.\n\n```c\n#include <stdio.h>\n#include <string.h>\n\nint main(void) {\n char text[100];\n\n printf(\"Enter a string: \");\n if (!fget...
beam-free
qa-v1
validation
249
a03847fba1af5fbe
en
code_c
can u make a c program that reverses an array
This program reverses a fixed array of five numbers in place. ```c #include <stdio.h> int main(void) { int a[] = {1, 2, 3, 4, 5}; int n = 5; for (int i = 0; i < n / 2; i++) { int t = a[i]; a[i] = a[n - 1 - i]; a[n - 1 - i] = t; } for (int i = 0; i < n; i++) { print...
[ { "role": "user", "content": "can u make a c program that reverses an array" }, { "role": "assistant", "content": "This program reverses a fixed array of five numbers in place.\n```c\n#include <stdio.h>\n\nint main(void) {\n int a[] = {1, 2, 3, 4, 5};\n int n = 5;\n\n for (int i = 0; i ...
beam-free
qa-v1
train
211
373587715888314e
en
code_c
factorial of a number in c
This program reads a non-negative integer and prints its factorial. ```c #include <stdio.h> int main(void) { int n; unsigned long long result = 1; printf("Enter a non-negative integer: "); if (scanf("%d", &n) != 1 || n < 0) { return 1; } for (int i = 2; i <= n; i++) { result ...
[ { "role": "user", "content": "factorial of a number in c" }, { "role": "assistant", "content": "This program reads a non-negative integer and prints its factorial.\n\n```c\n#include <stdio.h>\n\nint main(void) {\n int n;\n unsigned long long result = 1;\n\n printf(\"Enter a non-negative...
beam-free
qa-v1
train
178
d76ad1aef4a210bc
en
code_c
sum and average of an array in c pls
This program adds the numbers in a fixed array and prints their sum and average. ```c #include <stdio.h> int main(void) { int nums[] = {4, 8, 15, 16, 23, 42}; int size = sizeof(nums) / sizeof(nums[0]); int sum = 0; for (int i = 0; i < size; i++) { sum += nums[i]; } printf("Sum: %d\n",...
[ { "role": "user", "content": "sum and average of an array in c pls" }, { "role": "assistant", "content": "This program adds the numbers in a fixed array and prints their sum and average.\n```c\n#include <stdio.h>\n\nint main(void) {\n int nums[] = {4, 8, 15, 16, 23, 42};\n int size = sizeo...
beam-free
qa-v1
train
198
7a713bb1cdc33687
en
code_c
c program that reads two numbers and prints their sum
This program reads two numbers and prints their sum. ```c #include <stdio.h> int main(void) { int a; int b; printf("Enter two numbers: "); if (scanf("%d %d", &a, &b) != 2) { return 0; } printf("Sum: %d\n", a + b); return 0; } ``` Compile it with gcc -Wall -Wextra and run it; with ...
[ { "role": "user", "content": "c program that reads two numbers and prints their sum" }, { "role": "assistant", "content": "This program reads two numbers and prints their sum.\n```c\n#include <stdio.h>\n\nint main(void) {\n int a;\n int b;\n\n printf(\"Enter two numbers: \");\n if (s...
beam-free
qa-v1
train
145
8e30cd0023dc429c
en
code_c
make me a power function in C using a loop
This program raises one integer to the power of another with a loop. ```c #include <stdio.h> long long power(int base, int exponent) { long long result = 1; for (int i = 0; i < exponent; i++) { result *= base; } return result; } int main(void) { int base, exponent; printf("Enter base a...
[ { "role": "user", "content": "make me a power function in C using a loop" }, { "role": "assistant", "content": "This program raises one integer to the power of another with a loop.\n```c\n#include <stdio.h>\n\nlong long power(int base, int exponent) {\n long long result = 1;\n for (int i =...
beam-free
qa-v1
train
253
e657a92a1b65fcfa
en
code_c
c program to print a triangle of stars pls
This program reads a height and prints a left-aligned triangle of stars. ```c #include <stdio.h> int main(void) { int n; printf("Enter height: "); if (scanf("%d", &n) != 1) return 0; for (int i = 1; i <= n; i++) { for (int j = 0; j < i; j++) putchar('*'); putchar('\n'); } return...
[ { "role": "user", "content": "c program to print a triangle of stars pls" }, { "role": "assistant", "content": "This program reads a height and prints a left-aligned triangle of stars.\n```c\n#include <stdio.h>\n\nint main(void) {\n int n;\n printf(\"Enter height: \");\n if (scanf(\"%d\...
beam-free
qa-v1
train
168
102f61d8efb4d4d7
en
code_c
write a c program that prints the ascii code of a charcter
This program reads one character and prints its ASCII code. ```c #include <stdio.h> int main(void) { char c; printf("Enter a character: "); if (scanf(" %c", &c) != 1) { return 1; } printf("The ASCII code of '%c' is %d.\n", c, (int)c); return 0; } ``` Compile and run it, then type on...
[ { "role": "user", "content": "write a c program that prints the ascii code of a charcter" }, { "role": "assistant", "content": "This program reads one character and prints its ASCII code.\n\n```c\n#include <stdio.h>\n\nint main(void) {\n char c;\n\n printf(\"Enter a character: \");\n if...
beam-free
qa-v1
train
147
97233a69cebdffe4
en
code_c
make a celcius to farenheit table in c
This program prints a Celsius to Fahrenheit table from 0 to 100. ```c #include <stdio.h> int main(void) { printf("C F\n"); for (int c = 0; c <= 100; c += 10) { double f = c * 9.0 / 5.0 + 32.0; printf("%3d %6.1f\n", c, f); } return 0; } ``` Compile and run it; it prints the table wit...
[ { "role": "user", "content": "make a celcius to farenheit table in c" }, { "role": "assistant", "content": "This program prints a Celsius to Fahrenheit table from 0 to 100.\n```c\n#include <stdio.h>\n\nint main(void) {\n printf(\"C F\\n\");\n for (int c = 0; c <= 100; c += 10) {\n ...
beam-free
qa-v1
train
163
03f4d98840471491
en
code_c
gcd program in C
This program reads two integers and prints their greatest common divisor. ```c #include <stdio.h> int main(void) { int a, b; printf("Two numbers: "); if (scanf("%d %d", &a, &b) != 2) { printf("Bad input.\n"); return 0; } if (a < 0) a = -a; if (b < 0) b = -b; while (b != 0...
[ { "role": "user", "content": "gcd program in C" }, { "role": "assistant", "content": "This program reads two integers and prints their greatest common divisor.\n```c\n#include <stdio.h>\n\nint main(void) {\n int a, b;\n\n printf(\"Two numbers: \");\n if (scanf(\"%d %d\", &a, &b) != 2) {...
beam-free
qa-v1
train
211
ce961b4089a0df38
en
code_c
c program to average numbers the user enters
This program asks for a count, then reads that many numbers and prints their average. ```c #include <stdio.h> int main(void) { int n; printf("How many numbers? "); if (scanf("%d", &n) != 1 || n <= 0) { printf("Please enter a positive count.\n"); return 0; } double sum = 0.0; for...
[ { "role": "user", "content": "c program to average numbers the user enters" }, { "role": "assistant", "content": "This program asks for a count, then reads that many numbers and prints their average.\n```c\n#include <stdio.h>\n\nint main(void) {\n int n;\n printf(\"How many numbers? \");\n...
beam-free
qa-v1
train
278
f73ddbdae63f9227
en
code_c
print the fibonacci sequence in C pls
This program reads how many terms to print and prints that many Fibonacci numbers. ```c #include <stdio.h> int main(void) { int n; printf("How many terms? "); if (scanf("%d", &n) != 1 || n < 1) { return 1; } long long a = 0, b = 1; for (int i = 0; i < n; i++) { printf("%lld "...
[ { "role": "user", "content": "print the fibonacci sequence in C pls" }, { "role": "assistant", "content": "This program reads how many terms to print and prints that many Fibonacci numbers.\n\n```c\n#include <stdio.h>\n\nint main(void) {\n int n;\n\n printf(\"How many terms? \");\n if (...
beam-free
qa-v1
train
207
c4aed9b0226093f1
en
code_c
find the smallest number in an aray in c
This program checks a fixed array and prints its smallest value. ```c #include <stdio.h> int main(void) { int nums[] = {9, 3, 7, 1, 5}; int size = sizeof(nums) / sizeof(nums[0]); int smallest = nums[0]; for (int i = 1; i < size; i++) { if (nums[i] < smallest) { smallest = nums[i]; ...
[ { "role": "user", "content": "find the smallest number in an aray in c" }, { "role": "assistant", "content": "This program checks a fixed array and prints its smallest value.\n```c\n#include <stdio.h>\n\nint main(void) {\n int nums[] = {9, 3, 7, 1, 5};\n int size = sizeof(nums) / sizeof(nu...
beam-free
qa-v1
train
174
d88d4f1177b03a69
en
code_c
helo world in c
This program prints Hello, world!. ```c #include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; } ``` Run it to see the greeting.
[ { "role": "user", "content": "helo world in c" }, { "role": "assistant", "content": "This program prints Hello, world!.\n```c\n#include <stdio.h>\n\nint main(void) {\n printf(\"Hello, world!\\n\");\n return 0;\n}\n```\nRun it to see the greeting." } ]
beam-free
qa-v1
validation
61
bf7c98dbf02b6718
en
code_c
build a small calcualtor in C with switch that reads two numbers and an operator
This program reads two numbers and an operator, then uses a switch to calculate the result. ```c #include <stdio.h> int main(void) { double a, b; char op; printf("Enter first number: "); if (scanf("%lf", &a) != 1) { return 0; } printf("Enter operator (+ - * /): "); if (scanf(" %c"...
[ { "role": "user", "content": "build a small calcualtor in C with switch that reads two numbers and an operator" }, { "role": "assistant", "content": "This program reads two numbers and an operator, then uses a switch to calculate the result.\n```c\n#include <stdio.h>\n\nint main(void) {\n dou...
beam-free
qa-v1
train
377
2f0cc84582f97266
en
code_c
count words in a sentence in c pls
This program counts the words in a fixed sentence. ```c #include <stdio.h> #include <ctype.h> int main(void) { char s[] = "The quick brown fox jumps"; int words = 0; int in_word = 0; for (int i = 0; s[i] != '\0'; i++) { if (isspace((unsigned char)s[i])) { in_word = 0; } else...
[ { "role": "user", "content": "count words in a sentence in c pls" }, { "role": "assistant", "content": "This program counts the words in a fixed sentence.\n```c\n#include <stdio.h>\n#include <ctype.h>\n\nint main(void) {\n char s[] = \"The quick brown fox jumps\";\n int words = 0;\n int...
beam-free
qa-v1
train
192
9d9f384b18c55846
en
code_c
malloc an array in c and free it show me
This program allocates an array with malloc, fills it, prints it, and frees it. ```c #include <stdio.h> #include <stdlib.h> int main(void) { int n = 5; int *a = malloc(n * sizeof *a); if (!a) return 1; for (int i = 0; i < n; i++) a[i] = i + 1; for (int i = 0; i < n; i++) printf("%d ", a[i]); p...
[ { "role": "user", "content": "malloc an array in c and free it show me" }, { "role": "assistant", "content": "This program allocates an array with malloc, fills it, prints it, and frees it.\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n\nint main(void) {\n int n = 5;\n int *a = malloc(...
beam-free
qa-v1
train
210
e7e1d6f0aee5752b
en
code_c
read two numbers and print there sum in c
This program reads two integers and prints their sum. ```c #include <stdio.h> int main(void) { int a, b; if (scanf("%d %d", &a, &b) != 2) { return 1; } printf("%d\n", a + b); return 0; } ``` I tested it with the input "7 8", and it prints 15.
[ { "role": "user", "content": "read two numbers and print there sum in c" }, { "role": "assistant", "content": "This program reads two integers and prints their sum.\n```c\n#include <stdio.h>\n\nint main(void) {\n int a, b;\n\n if (scanf(\"%d %d\", &a, &b) != 2) {\n return 1;\n }\...
beam-free
qa-v1
train
118
7b199b40c4409714
en
code_html
quiz page? one question, three answer buttons, tell me if im right
This page asks one quiz question with three answer buttons and colors your pick green or red. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Quiz</title> <style> body { font-family: Arial, sans-serif; background: #eef3ff; text-align: center; padding-top: 60px; } button { display: block; margin:...
[ { "role": "user", "content": "quiz page? one question, three answer buttons, tell me if im right" }, { "role": "assistant", "content": "This page asks one quiz question with three answer buttons and colors your pick green or red.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\"...
glm-5.3-flash
qa-v1
train
385
20fa0939520bca75
en
code_html
can you make a foter that shows current year with js
This page shows a footer with the current year filled in by JavaScript. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Current Year Footer</title> <style> body { font-family: Arial, sans-serif; min-height: 100vh; margin: 0; } footer { position: fixed; bottom: 0; width: 100%; text-align: c...
[ { "role": "user", "content": "can you make a foter that shows current year with js" }, { "role": "assistant", "content": "This page shows a footer with the current year filled in by JavaScript.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Current Year F...
beam-free
qa-v1
train
251
3d18915f906ee33c
en
code_html
blog post layout with a title, date and some text please
Here is a blog post card with a title, a date and a short text. ```html <!DOCTYPE html> <html> <head> <title>My Blog</title> <style> body { font-family: Arial; background: #fafafa; } article { max-width: 600px; margin: 40px auto; background: white; padding: 25px; border: 1px solid #dddddd; } ...
[ { "role": "user", "content": "blog post layout with a title, date and some text please" }, { "role": "assistant", "content": "Here is a blog post card with a title, a date and a short text.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>My Blog</title>\n<style>\n body { font-family: Arial; b...
glm-5.3-flash
qa-v1
train
309
118b0231ed73e1be
en
code_html
hey can u make me a textarea that counts characters as i type
This page counts how many characters are in a text area as you type. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Character Counter</title> <style> body { font-family: sans-serif; margin: 40px; } textarea { width: 100%; max-width: 400px; height: 120px; } </style> </head...
[ { "role": "user", "content": "hey can u make me a textarea that counts characters as i type" }, { "role": "assistant", "content": "This page counts how many characters are in a text area as you type.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <title>Ch...
hy4-preview
qa-v1
train
296
26e02f918fbaae23
en
code_html
i need a tiny webpage with 2 input boxes and a button that adds the numbers together
The page takes the numbers from two input boxes and writes their sum next to them when you press the "=" button. ```html <!DOCTYPE html> <html> <head> <title>Add Two Numbers</title> <style> body { font-family: sans-serif; padding: 20px; } input { width: 80px; padding: 6px; } button { padding: 6px 12px;...
[ { "role": "user", "content": "i need a tiny webpage with 2 input boxes and a button that adds the numbers together" }, { "role": "assistant", "content": "The page takes the numbers from two input boxes and writes their sum next to them when you press the \"=\" button.\n\n```html\n<!DOCTYPE html>...
hy4-preview
qa-v1
train
329
8064c0c345d926da
en
code_html
make me a website with my favourite games and a short description for each
This page lists four games, each with one line about why I like it. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Favorite Games</title> <style> body { font-family: sans-serif; max-width: 560px; margin: 40px auto; } li { margin-bottom: 8px; } </style> </head> <body> <h1>My Favorite...
[ { "role": "user", "content": "make me a website with my favourite games and a short description for each" }, { "role": "assistant", "content": "This page lists four games, each with one line about why I like it.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<ti...
hy4-preview
qa-v1
train
292
b8f334c79a0e859d
en
code_html
write me an html page with a button that changes the bg to a random color
This page has one button that paints the background in a new random color each time you click it. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Random Background</title> <style> body { font-family: sans-serif; display: flex; align-items: center; justify-content: center; height: 100vh; m...
[ { "role": "user", "content": "write me an html page with a button that changes the bg to a random color" }, { "role": "assistant", "content": "This page has one button that paints the background in a new random color each time you click it.\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n <meta ch...
hy4-preview
qa-v1
train
364
b2a5e4e3e96ddd38
en
code_html
make me a website for my little cafe, needs opening hours on it pls
This is a one page site for a small cafe, with the opening hours in a table. ```html <!DOCTYPE html> <html> <head> <title>Sunny Bean Cafe</title> <style> body { font-family: Arial, sans-serif; margin: 0; background: #fff7ee; } header { background: #6b3f26; color: white; padding: 30px; text-align: center; } ...
[ { "role": "user", "content": "make me a website for my little cafe, needs opening hours on it pls" }, { "role": "assistant", "content": "This is a one page site for a small cafe, with the opening hours in a table.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n <title>Sunny Bean Cafe</title>\n <st...
hy4-preview
qa-v1
train
530
6539177184238697
en
code_html
can u make a restaurant menu page with prices
This page lists a few dishes with their prices next to them. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Menu</title> <style> body { font-family: Georgia, serif; max-width: 440px; margin: 30px auto; } h1 { text-align: center; } li { display: flex; justify-content: space-between;...
[ { "role": "user", "content": "can u make a restaurant menu page with prices" }, { "role": "assistant", "content": "This page lists a few dishes with their prices next to them.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Menu</title>\n<style>\n body ...
hy4-preview
qa-v1
train
419
241f43145e35c9ab
en
code_html
make a little website about my dog
It is a small page about a dog, with a box you can replace with a photo and a list of favourite things. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>My Dog</title> <style> body { font-family: sans-serif; max-width: 480px; margin: 40px auto; line-height: 1.5; } h1 { color: ...
[ { "role": "user", "content": "make a little website about my dog" }, { "role": "assistant", "content": "It is a small page about a dog, with a box you can replace with a photo and a list of favourite things.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <ti...
hy4-preview
qa-v1
train
380
3f5991b20a00581b
en
code_html
its my bday soon, make me a party invitation page
This page is a pink birthday invitation with the party details on a card. ```html <!DOCTYPE html> <html> <head> <title>Birthday Party</title> <style> body { background: #fff0f5; font-family: sans-serif; text-align: center; } .card { background: white; border: 3px dashed hotpink; border-radius: 15px; padding: 30px; ...
[ { "role": "user", "content": "its my bday soon, make me a party invitation page" }, { "role": "assistant", "content": "This page is a pink birthday invitation with the party details on a card.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Birthday Party</title>\n<style>\n body { background:...
glm-5.3-flash
qa-v1
train
267
2dd8a9a488092146
en
code_html
write a simple html table with the planets in order from the sun
A page with a table that lists the eight planets in order from the Sun, with their distance in million km. ```html <!DOCTYPE html> <html> <head> <title>Planets</title> <style> body { font-family: Arial, sans-serif; padding: 30px; } table { border-collapse: collapse; } th, td { border: 1px solid #999; padding: 8px...
[ { "role": "user", "content": "write a simple html table with the planets in order from the sun" }, { "role": "assistant", "content": "A page with a table that lists the eight planets in order from the Sun, with their distance in million km.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Plane...
glm-5.3-flash
qa-v1
train
525
4307311b461a68dc
en
code_html
write html for 3 cards in a grid that also works on a phone
This page puts three cards side by side and stacks them into one column on narrow screens. ```html <!DOCTYPE html> <html> <head> <title>Card Grid</title> <style> body { font-family: Arial, sans-serif; margin: 20px; } .grid { display: grid; gap: 15px; grid-template-columns: repeat(3, 1fr); /* 3 columns on wide scr...
[ { "role": "user", "content": "write html for 3 cards in a grid that also works on a phone" }, { "role": "assistant", "content": "This page puts three cards side by side and stacks them into one column on narrow screens.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Card Grid</title>\n<style>...
glm-5.3-flash
qa-v1
train
365
e122439330bb6e38
en
code_html
write me a dark mode toggle button dont use any libraries
This page has one button that switches the whole page between light and dark colors. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Dark Mode Toggle</title> <style> body { font-family: sans-serif; padding: 40px; background: #ffffff; color: #111111; } body.dark { background:...
[ { "role": "user", "content": "write me a dark mode toggle button dont use any libraries" }, { "role": "assistant", "content": "This page has one button that switches the whole page between light and dark colors.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\...
hy4-preview
qa-v1
train
323
88c637871f96ceda
en
code_html
hey can you make a lil page about my dog
This page is a small fan page for a dog, with a short description and a list of his favorite things. ```html <!DOCTYPE html> <html> <head> <title>My dog</title> <style> body { font-family: sans-serif; margin: 40px; max-width: 600px; } h1 { color: #8a4b00; } ul { line-height: 1.6; } </style> </head> <...
[ { "role": "user", "content": "hey can you make a lil page about my dog" }, { "role": "assistant", "content": "This page is a small fan page for a dog, with a short description and a list of his favorite things.\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n <title>My dog</title>\n <style>\n ...
hy4-preview
qa-v1
train
292
14cb43cb18a65ec9
en
code_html
need a login page thats just the look, centered on the screen, no backend
This page shows a login form centered in the middle of the screen, and the Login button does nothing. ```html <!DOCTYPE html> <html> <head> <title>Login</title> <style> body { font-family: Arial, sans-serif; } .box { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 240px; pa...
[ { "role": "user", "content": "need a login page thats just the look, centered on the screen, no backend" }, { "role": "assistant", "content": "This page shows a login form centered in the middle of the screen, and the Login button does nothing.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>L...
glm-5.3-flash
qa-v1
train
327
8cda6c1687a350cd
en
code_html
could you code a page that greets you by the name you type in?
A page with a name input and a Say hi button that greets you by the name you typed. ```html <!DOCTYPE html> <html> <head> <title>Greeting</title> <style> body { font-family: Arial, sans-serif; text-align: center; padding-top: 80px; } input { font-size: 18px; padding: 8px; } button { font-size: 16px; padding: 8px ...
[ { "role": "user", "content": "could you code a page that greets you by the name you type in?" }, { "role": "assistant", "content": "A page with a name input and a Say hi button that greets you by the name you typed.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Greeting</title>\n<style>\n b...
glm-5.3-flash
qa-v1
train
395
2e2d1f46881613e0
en
code_html
dark mode toggle button for my page how do i do that
The button switches the whole page between light and dark colors by adding a class to the body. ```html <!DOCTYPE html> <html> <head> <title>Dark Mode</title> <style> body { font-family: sans-serif; padding: 40px; background: #ffffff; color: #111111; } body.dark { background: #1b1b1b; color: #f5f5f5; } button { paddin...
[ { "role": "user", "content": "dark mode toggle button for my page how do i do that" }, { "role": "assistant", "content": "The button switches the whole page between light and dark colors by adding a class to the body.\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Dark Mode</title>\n<style>...
hy4-preview
qa-v1
train
324
72eadb29eb4a7ef2
en
code_html
hey, celsius to fahrenheit converter in html?
The converter turns a Celsius number into Fahrenheit when you click Convert. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>C to F</title> <style> body { font-family: sans-serif; text-align: center; padding: 60px 20px; } input { font-size: 18px; padding: 8px; width: 110px; } button ...
[ { "role": "user", "content": "hey, celsius to fahrenheit converter in html?" }, { "role": "assistant", "content": "The converter turns a Celsius number into Fahrenheit when you click Convert.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>C to F</title>\n...
glm-5.3-flash
qa-v1
train
428
8fcad9ecd4a6bb0f
en
code_html
build a simple timeline with five events down the side
This page shows five dated events as a vertical timeline with a line down the left side. ```html <!DOCTYPE html> <html> <head> <title>Timeline</title> <style> body { font-family: sans-serif; padding: 20px; } ul { border-left: 4px solid #333; list-style: none; padding-left: 20px; } li { margin: 12px 0; ...
[ { "role": "user", "content": "build a simple timeline with five events down the side" }, { "role": "assistant", "content": "This page shows five dated events as a vertical timeline with a line down the left side.\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n <title>Timeline</title>\n <style>\n...
hy4-preview
qa-v1
train
355
7dac5501b9a8e2f7
en
code_html
can u make me a simple webpage for a restaurant menu with prices
It's a one-file menu page for a small Italian restaurant, with starters, mains and desserts and the prices lined up on the right. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bella Roma - Menu</title> <style> body { font-family: Arial, sans-serif; margin: 40px; max-width: 420px; } h...
[ { "role": "user", "content": "can u make me a simple webpage for a restaurant menu with prices" }, { "role": "assistant", "content": "It's a one-file menu page for a small Italian restaurant, with starters, mains and desserts and the prices lined up on the right.\n```html\n<!DOCTYPE html>\n<html...
hy4-preview
qa-v1
train
579
86f1a9363ac85014
en
code_html
my footer still says 2021, how do i show the current year with javascript
This page sets the year in the footer from the computer clock, so it always shows the current one. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Footer year</title> <style> body { font-family: sans-serif; margin: 0; min-height: 100vh; display: flex; flex-direction: column; } main { flex: 1; paddi...
[ { "role": "user", "content": "my footer still says 2021, how do i show the current year with javascript" }, { "role": "assistant", "content": "This page sets the year in the footer from the computer clock, so it always shows the current one.\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<meta cha...
hy4-preview
qa-v1
train
325
437f19722fa7bf44
en
code_html
can i get a page showing the current time that updates every second
This page shows the time from your computer and refreshes it every second. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Current Time</title> <style> body { font-family: sans-serif; margin: 40px; } #clock { font-size: 40px; } </style> </head> <body> <h1>What time is it...
[ { "role": "user", "content": "can i get a page showing the current time that updates every second" }, { "role": "assistant", "content": "This page shows the time from your computer and refreshes it every second.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\...
hy4-preview
qa-v1
train
265
1b83bd6e2b0cf5f8
en
code_html
i need a restaurant menu page with prices, plain html please
This page shows a small cafe menu with mains and drinks and their prices. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Blue Lemon Cafe Menu</title> <style> body { font-family: Georgia, serif; max-width: 480px; margin: 30px auto; padding: 0 16px; } ul { list-style: none; padding: 0; } li { d...
[ { "role": "user", "content": "i need a restaurant menu page with prices, plain html please" }, { "role": "assistant", "content": "This page shows a small cafe menu with mains and drinks and their prices.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>Blue Lemon Cafe ...
glm-5.3-flash
qa-v1
train
394
dace1659e2ef03a0
en
code_html
hey can you write html with a button that shows a new random quote each time i click it
The page keeps four short quotes in a list and puts a random one on screen every time you press the button. ```html <!DOCTYPE html> <html> <head> <title>Random Quote</title> <style> body { font-family: sans-serif; padding: 20px; max-width: 480px; } button { padding: 6px 12px; } </style> </head> <body> ...
[ { "role": "user", "content": "hey can you write html with a button that shows a new random quote each time i click it" }, { "role": "assistant", "content": "The page keeps four short quotes in a list and puts a random one on screen every time you press the button.\n\n```html\n<!DOCTYPE html>\n<h...
hy4-preview
qa-v1
train
332
8f4599bce0653e0d
en
code_html
hello world page in html
This is the smallest useful HTML page, it just shows "Hello, World!" on the screen. ```html <!DOCTYPE html> <html> <head> <title>Hello World</title> <style> body { font-family: Arial, sans-serif; text-align: center; padding-top: 150px; } </style> </head> <body> <h1>Hello, World!</h1> </body> </html> ``` Save it as he...
[ { "role": "user", "content": "hello world page in html" }, { "role": "assistant", "content": "This is the smallest useful HTML page, it just shows \"Hello, World!\" on the screen.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Hello World</title>\n<style>\n body { font-family: Arial, sans-se...
glm-5.3-flash
qa-v1
validation
137
1d9ef0d1433719c8
en
code_html
timline of five events
This page shows five events on a simple timeline. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Timeline</title> <style> body { font-family: Arial, sans-serif; margin: 40px; } .timeline { border-left: 3px solid #333; padding-left: 20px; } .event { margin-bottom: 16px; } .year { font-weig...
[ { "role": "user", "content": "timline of five events" }, { "role": "assistant", "content": "This page shows five events on a simple timeline.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Timeline</title>\n<style>\nbody { font-family: Arial, sans-serif; ...
beam-free
qa-v1
train
335
e4b70a8aa91f8a6a
en
code_html
make me a website with a blog post on it, just a title, a date and some text
This is a simple blog post page with a title, a date and two short paragraphs. ```html <!DOCTYPE html> <html lang="en"> <head> <title>My Blog</title> <style> body { font-family: Georgia, serif; max-width: 600px; margin: 40px auto; padding: 0 20px; color: #222; } h1 { font-size: 28px; } .date { color: #777; font-size: 1...
[ { "role": "user", "content": "make me a website with a blog post on it, just a title, a date and some text" }, { "role": "assistant", "content": "This is a simple blog post page with a title, a date and two short paragraphs.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title>My Blog</...
glm-5.3-flash
qa-v1
train
316
62c55f9d89516e17
en
code_html
can u make me a birthday party invitation webpage i can screenshot and send my friends
A single page that shows a party invitation inside a dashed card. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>You're invited!</title> <style> body { background: #fff3cd; font-family: sans-serif; text-align: center; padding: 40px; } .card { background: white; border: 3px ...
[ { "role": "user", "content": "can u make me a birthday party invitation webpage i can screenshot and send my friends" }, { "role": "assistant", "content": "A single page that shows a party invitation inside a dashed card.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\...
hy4-preview
qa-v1
train
380
a0b60b091c69b44c
en
code_html
can you do a responsive grid with three cards?
This grid shows three cards side by side on wide screens and stacked on narrow ones. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Three Cards</title> <style> .grid { display: grid; gap: 16px; padding: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } .ca...
[ { "role": "user", "content": "can you do a responsive grid with three cards?" }, { "role": "assistant", "content": "This grid shows three cards side by side on wide screens and stacked on narrow ones.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Three C...
glm-5.3-flash
qa-v1
train
326
a42908bebb2afa01
en
code_html
make me a number guessing game website, it should pick a secret number from 1 to 100 and say if my guess is too high or too low
This page picks a secret number from 1 to 100 and tells you if each guess is too low, too high or correct. ```html <!DOCTYPE html> <html> <head> <title>Guess the Number</title> <style> body { font-family: Arial, sans-serif; text-align: center; margin-top: 40px; } input, button { font-size: 16px; padding: 6px; } </style...
[ { "role": "user", "content": "make me a number guessing game website, it should pick a secret number from 1 to 100 and say if my guess is too high or too low" }, { "role": "assistant", "content": "This page picks a secret number from 1 to 100 and tells you if each guess is too low, too high or c...
glm-5.3-flash
qa-v1
train
435
e2b3b13347857e77
en
code_html
could you make a celcius to fahrenheit converter page
This page converts a temperature you type from Celsius to Fahrenheit. ```html <!DOCTYPE html> <html> <head> <title>Celsius to Fahrenheit</title> <style> body { font-family: Arial, sans-serif; text-align: center; margin-top: 40px; } input, button { font-size: 16px; padding: 6px; } </style> </head> <body> <h1>Celsius to ...
[ { "role": "user", "content": "could you make a celcius to fahrenheit converter page" }, { "role": "assistant", "content": "This page converts a temperature you type from Celsius to Fahrenheit.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Celsius to Fahrenheit</title>\n<style>\nbody { font-f...
glm-5.3-flash
qa-v1
train
360
a380bf9ba722ae1d
en
code_html
can you make a small webpage about my dog rex? his age and favorite toy and stuff
This page is a short profile of Rex with a few facts in a list. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>My Dog</title> <style> body { font-family: sans-serif; max-width: 500px; margin: 20px auto; } h1 { color: sienna; } </style> </head> <body> <h1>Meet Rex</h1> <p>Rex is my dog and the b...
[ { "role": "user", "content": "can you make a small webpage about my dog rex? his age and favorite toy and stuff" }, { "role": "assistant", "content": "This page is a short profile of Rex with a few facts in a list.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>My Do...
glm-5.3-flash
qa-v1
train
259
9739bfe3a2d156d2
en
code_html
hey can u make me a simple login page centered in the middle, just the look no backend needed
This page shows a centered login box with a username field, a password field and a Log in button. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Login</title> <style> body { font-family: sans-serif; background: #f2f2f2; } .box { width: 260px; margin: 80px auto; padding: 20px; backgrou...
[ { "role": "user", "content": "hey can u make me a simple login page centered in the middle, just the look no backend needed" }, { "role": "assistant", "content": "This page shows a centered login box with a username field, a password field and a Log in button.\n```html\n<!DOCTYPE html>\n<html la...
hy4-preview
qa-v1
train
343
9891f5db768e2747
en
code_html
write me a birthday party invitation page, something cute i can send my friends
This is a pink invitation card with the guest of honor, date, time, place and a short note at the bottom. ```html <!DOCTYPE html> <html> <head> <title>Birthday Invitation</title> <style> body { font-family: sans-serif; background: #fff5f8; color: #333; text-align: center; padding: 30px; } .card { backgroun...
[ { "role": "user", "content": "write me a birthday party invitation page, something cute i can send my friends" }, { "role": "assistant", "content": "This is a pink invitation card with the guest of honor, date, time, place and a short note at the bottom.\n\n```html\n<!DOCTYPE html>\n<html>\n<hea...
hy4-preview
qa-v1
train
326
3207f9c44cdc3858
en
code_html
i need a page that says hello using whatever name i type in
This page reads the name you type and greets you with it after you press the button. ```html <!DOCTYPE html> <html> <head> <title>Hello</title> <style> body { font-family: sans-serif; padding: 20px; } input, button { font-size: 16px; margin: 4px; } </style> </head> <body> <h1>What is your name?</h1> ...
[ { "role": "user", "content": "i need a page that says hello using whatever name i type in" }, { "role": "assistant", "content": "This page reads the name you type and greets you with it after you press the button.\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n <title>Hello</title>\n <style>\n ...
hy4-preview
qa-v1
train
279
df77c678c5b8ce26
en
code_html
how do i make a page that adds two numbers form two input boxes
This page adds the two numbers you type into the two input boxes. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Add Two Numbers</title> <style> body { font-family: sans-serif; max-width: 300px; margin: 40px auto; } input { display: block; margin: 8px 0; padding: 6px; width: 140px; } ...
[ { "role": "user", "content": "how do i make a page that adds two numbers form two input boxes" }, { "role": "assistant", "content": "This page adds the two numbers you type into the two input boxes.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Add Two N...
glm-5.3-flash
qa-v1
train
355
559c54c4fb56892d
en
code_html
need a centered login form, just the look no backend
This page shows a login form centered in the middle of the screen, with no backend, just the look. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Login</title> <style> body { display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; background: #2b2f36; font-famil...
[ { "role": "user", "content": "need a centered login form, just the look no backend" }, { "role": "assistant", "content": "This page shows a login form centered in the middle of the screen, with no backend, just the look.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title...
glm-5.3-flash
qa-v1
train
383
9e27f4f9f53eaad5
en
code_html
need a FAQ page using details and summary
This page shows three questions that open their answers when clicked, built with details and summary. ```html <!DOCTYPE html> <html> <head> <title>FAQ</title> <style> body { font-family: Arial, sans-serif; max-width: 600px; margin: 40px auto; } details { background: #f5f5f5; border-radius: 8px; padding: 10px 16px; ...
[ { "role": "user", "content": "need a FAQ page using details and summary" }, { "role": "assistant", "content": "This page shows three questions that open their answers when clicked, built with details and summary.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>FAQ</title>\n<style>\n body { fo...
glm-5.3-flash
qa-v1
train
342
e4b4bda085113f9b
en
code_html
make me a simple website with a light switch that turns a circle yellow when you click it
This page shows a dark circle that turns yellow when you press the button. ```html <!DOCTYPE html> <html> <head> <title>Light Switch</title> <style> body { text-align: center; font-family: sans-serif; } #bulb { width: 100px; height: 100px; border-radius: 50%; background: #444; margin: 20px auto; } </style> </head> ...
[ { "role": "user", "content": "make me a simple website with a light switch that turns a circle yellow when you click it" }, { "role": "assistant", "content": "This page shows a dark circle that turns yellow when you press the button.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Light Switch...
glm-5.3-flash
qa-v1
train
293
1fd8ce97a3601428
en
code_html
build a page that greets you by the name you type in
This page has a name box and a button that greets you with the name you typed. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Greeting</title> <style> body { font-family: Arial, sans-serif; text-align: center; padding: 40px; } input, button { padding: 8px; font-size: 16px; } </style> </head> <b...
[ { "role": "user", "content": "build a page that greets you by the name you type in" }, { "role": "assistant", "content": "This page has a name box and a button that greets you with the name you typed.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>Greeting</title>\n<...
glm-5.3-flash
qa-v1
validation
335
a9b8d5c53156202d
en
code_html
hey can u do a button that changes the background to a random color
This page has one button that sets the background to a new random RGB color on every click. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Random background color</title> <style> body { font-family: sans-serif; text-align: center; padding: 80px; background: #ffffff; } button { paddin...
[ { "role": "user", "content": "hey can u do a button that changes the background to a random color" }, { "role": "assistant", "content": "This page has one button that sets the background to a new random RGB color on every click.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta char...
hy4-preview
qa-v1
train
375
db34ec537df38a8a
en
code_html
a quiz page with one question and 3 answer buttons pls
This page asks one quiz question and checks the three answer buttons when you click them. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Little Quiz</title> <style> body { font-family: sans-serif; text-align: center; margin-top: 60px; } button { display: block; margin: 10px auto; padd...
[ { "role": "user", "content": "a quiz page with one question and 3 answer buttons pls" }, { "role": "assistant", "content": "This page asks one quiz question and checks the three answer buttons when you click them.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<...
glm-5.3-flash
qa-v1
train
402
c872b92a4e87417e
en
code_html
write a simple personal homepage with my name, a short bio and my hobbys
Here is a small homepage with a name, a short bio and a hobby list, which you can swap for your own text. ```html <!DOCTYPE html> <html> <head> <title>About Me</title> <style> body { font-family: Arial, sans-serif; max-width: 500px; margin: 40px auto; } h1 { color: #2c3e50; } li { margin: 6px 0; } </style> </head...
[ { "role": "user", "content": "write a simple personal homepage with my name, a short bio and my hobbys" }, { "role": "assistant", "content": "Here is a small homepage with a name, a short bio and a hobby list, which you can swap for your own text.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<titl...
glm-5.3-flash
qa-v1
train
281
dfd8337dba2871c4
en
code_html
write the html for a contact form, name email and message, it doesnt need to actually send
This form shows name, email and message fields with a Send button, and nothing gets sent anywhere. ```html <!DOCTYPE html> <html> <head> <title>Contact Form</title> <style> body { font-family: Arial, sans-serif; max-width: 400px; margin: 40px auto; } label { display: block; margin-top: 12px; } input, textarea { w...
[ { "role": "user", "content": "write the html for a contact form, name email and message, it doesnt need to actually send" }, { "role": "assistant", "content": "This form shows name, email and message fields with a Send button, and nothing gets sent anywhere.\n```html\n<!DOCTYPE html>\n<html>\n<h...
glm-5.3-flash
qa-v1
train
347
1c2d91c5cb4787e8
en
code_html
build me a grid with 3 cards that stack on phones
This page shows three cards side by side that stack in one column on narrow screens. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Cards</title> <style> body { font-family: Arial, sans-serif; margin: 24px; } .grid { display: grid; grid-template-columns: repeat(3, 1fr); ga...
[ { "role": "user", "content": "build me a grid with 3 cards that stack on phones" }, { "role": "assistant", "content": "This page shows three cards side by side that stack in one column on narrow screens.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Card...
glm-5.3-flash
qa-v1
train
400
05c67a38e3ed2185
en
code_html
make me a pricing table with 3 plans pls
A centered table comparing three plans, Basic, Pro and Team, with prices and features. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Plans</title> <style> body { font-family: sans-serif; background: #f4f4f4; padding: 30px; } table { border-collapse: collapse; margin: auto;...
[ { "role": "user", "content": "make me a pricing table with 3 plans pls" }, { "role": "assistant", "content": "A centered table comparing three plans, Basic, Pro and Team, with prices and features.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <title>Plans...
hy4-preview
qa-v1
train
431
4605b8c5f0a9d1dc
en
code_html
write the html for a centered login form, just the look, no backend
This page shows a login form centered in the middle of the screen, with no backend. ```html <!DOCTYPE html> <html> <head> <title>Login</title> <style> body { font-family: Arial; display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #f2f2f2; } form { background: white; padding: 30px...
[ { "role": "user", "content": "write the html for a centered login form, just the look, no backend" }, { "role": "assistant", "content": "This page shows a login form centered in the middle of the screen, with no backend.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Login</title>\n<style>\nb...
glm-5.3-flash
qa-v1
train
411
ccf9324a8610fe03
en
code_html
i want a page with one button that counts how many times you clicked it
Each click on the button adds 1 to a running total that is shown underneath it. ```html <!DOCTYPE html> <html> <head> <title>Click Counter</title> <style> body { font-family: sans-serif; padding: 20px; } button { padding: 8px 16px; font-size: 18px; } </style> </head> <body> <h1>Click counter</h1> <bu...
[ { "role": "user", "content": "i want a page with one button that counts how many times you clicked it" }, { "role": "assistant", "content": "Each click on the button adds 1 to a running total that is shown underneath it.\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n <title>Click Counter</title>...
hy4-preview
qa-v1
train
274
afd32f63488c62ab
en
code_html
i need a faq page where the answers open when you click, html only
This page shows three questions that open and close when clicked, built with details and summary. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>FAQ</title> <style> body { font-family: Arial, sans-serif; max-width: 560px; margin: 40px auto; padding: 0 16px; } h1 { te...
[ { "role": "user", "content": "i need a faq page where the answers open when you click, html only" }, { "role": "assistant", "content": "This page shows three questions that open and close when clicked, built with details and summary.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta c...
glm-5.3-flash
qa-v1
train
383
aae9f09bd35261a5
en
code_html
can u make a faq page with those collapsible answers? details and summary i think
This FAQ page uses the details and summary tags, so each answer folds open when you click its question. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>FAQ</title> <style> body { font-family: sans-serif; max-width: 600px; margin: 30px auto; padding: 0 15px; } details { background: #f2f2f2; ...
[ { "role": "user", "content": "can u make a faq page with those collapsible answers? details and summary i think" }, { "role": "assistant", "content": "This FAQ page uses the details and summary tags, so each answer folds open when you click its question.\n```html\n<!DOCTYPE html>\n<html>\n<head>...
glm-5.3-flash
qa-v1
train
362
f7618cb364cf69b0
en
code_html
write a simple landing page for my little cafe, it should show the opening hours
This is a one-page site for a cafe with a short welcome line and its opening hours in a small box. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>The Corner Cup</title> <style> body { font-family: sans-serif; text-align: center; background: #fdf6ec; color: #4b3a2a; padding: 40px; } h1 { font-size: ...
[ { "role": "user", "content": "write a simple landing page for my little cafe, it should show the opening hours" }, { "role": "assistant", "content": "This is a one-page site for a cafe with a short welcome line and its opening hours in a small box.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<met...
glm-5.3-flash
qa-v1
train
339
d4062b9152c88751
en
code_html
html button that changes the background to a random color pls
This page has a button that paints the background a new random color on every click. ```html <!DOCTYPE html> <html> <head> <title>Random Color</title> <style> body { font-family: Arial, sans-serif; text-align: center; padding-top: 150px; } button { padding: 12px 24px; font-size: 16px; } </style> </head> <body> <h1>...
[ { "role": "user", "content": "html button that changes the background to a random color pls" }, { "role": "assistant", "content": "This page has a button that paints the background a new random color on every click.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Random Color</title>\n<style>\...
glm-5.3-flash
qa-v1
train
339
8edf30be675863b7
en
code_html
Can you make a page that shows the current time and updates every second?
This page shows the current time in large text and updates it every second. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Clock</title> <style> body { font-family: Arial, sans-serif; text-align: center; background: #222; color: #eee; padding-top: 100px; } h1 { font-size: 60px; } </st...
[ { "role": "user", "content": "Can you make a page that shows the current time and updates every second?" }, { "role": "assistant", "content": "This page shows the current time in large text and updates it every second.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\...
glm-5.3-flash
qa-v1
train
259
78be6cf8e0b8339e
en
code_html
make me a page with a button that changes the background to a random color pls
Clicking the button paints the whole page background with a random color. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Random background</title> <style> body { font-family: sans-serif; text-align: center; padding: 60px; background: #fff; } button { padding: 10px 16px; font-size: 16p...
[ { "role": "user", "content": "make me a page with a button that changes the background to a random color pls" }, { "role": "assistant", "content": "Clicking the button paints the whole page background with a random color.\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf...
hy4-preview
qa-v1
train
333
e8606e9954d6649c
en
code_html
i need a tip calculator webpage, html only
This page takes a bill and a tip percent and shows the tip and the total. ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Tip Calculator</title> <style> body { font-family: sans-serif; max-width: 320px; margin: 40px auto; padding: 0 15px; } label { display: block; margin-top: 10px; font-weight: ...
[ { "role": "user", "content": "i need a tip calculator webpage, html only" }, { "role": "assistant", "content": "This page takes a bill and a tip percent and shows the tip and the total.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>Tip Calculator</title>\n<style>\n ...
glm-5.3-flash
qa-v1
train
551
1c803617d3a1b739
en
code_html
i need a timeline page with five events, big years next to each one
This page shows five life events as a simple vertical timeline with the years sticking out. ```html <!DOCTYPE html> <html> <head> <title>Timeline</title> <style> body { font-family: Arial, sans-serif; max-width: 420px; margin: 30px auto; } ul { list-style: none; padding-left: 0; } li { margin: 14px 0; padding-lef...
[ { "role": "user", "content": "i need a timeline page with five events, big years next to each one" }, { "role": "assistant", "content": "This page shows five life events as a simple vertical timeline with the years sticking out.\n```html\n<!DOCTYPE html>\n<html>\n<head>\n<title>Timeline</title>\...
glm-5.3-flash
qa-v1
train
364
1b41ce9a03ea7cb3
en
code_html
i need a character counter for a textarea
This page counts the characters you type in a text area and turns the counter red past 200. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Character Counter</title> <style> body { font-family: sans-serif; max-width: 420px; margin: 40px auto; } textarea { width: 100%; box-sizing: bord...
[ { "role": "user", "content": "i need a character counter for a textarea" }, { "role": "assistant", "content": "This page counts the characters you type in a text area and turns the counter red past 200.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Cha...
hy4-preview
qa-v1
train
381