--- title: "Gradebook for Teachers" id: 76445 type: "computer_media" slug: "gradebook-for-teachers" url: "http://localhost/computer_media/gradebook-for-teachers/" markdown_url: "http://localhost/computer_media/gradebook-for-teachers.md" published_at: "2026-11-11T08:02:45+00:00" modified_at: "2026-11-11T08:02:45+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/gradebook-for-teachers-1.png" excerpt: "Average a student's grades on a 1K ZX80 and print the result to three decimal places, using only integer arithmetic." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "ZX80" slug: "zx80" taxonomy: "post_tag" url: "http://localhost/tag/zx80/" model: - name: "Sinclair ZX80" slug: "zx80" taxonomy: "model" url: "http://localhost/model/zx80/" indiv: - name: "Robert DeMunbrun" slug: "robert-demunbrun" taxonomy: "indiv" url: "http://localhost/indiv/robert-demunbrun/" genre: - name: "Education" slug: "education" taxonomy: "genre" url: "http://localhost/type/education/" media_type: "Program" programmers: - name: "Robert DeMunbrun" slug: "robert-demunbrun" taxonomy: "indiv" url: "http://localhost/indiv/robert-demunbrun/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Gradebook%20for%20Teachers%20%281981%29%28DeMunbrun%2C%20Robert%29%28ZX80%29%28US%29%28Program%29.zip" mediadate: "1981" images: - url: "http://localhost/wp-content/uploads/2026/11/gradebook-for-teachers-1.png" article_media: - id: 19650 title: "Gradebook for Teachers" type: "article" url: "http://localhost/article/gradebook-for-teachers/" media_type_tags: "Education" license: false --- # Gradebook for Teachers Enter the gradebook page and line number, then the grades one after another, and -1 to finish. The program prints the average to three decimal places, worked out with integer division because the 4K ZX80 has no decimals. CONT starts the next student. Totals of grades must stay under 32767. Published in Syntax October 1981 ([Gradebook for Teachers](https://timexsinclair.com/article/gradebook-for-teachers/)). ## Source Code ``` 1 PRINT "GRADEBOOK PAGE NUMBER IS "; 2 INPUT PG 3 PRINT PG 4 PRINT "GRADEBOOK LINE NUMBER IS "; 5 INPUT ID 6 PRINT ID 10 LET N=0 20 LET G1=0 25 PRINT "GRADE" 30 INPUT G 40 IF G<0 THEN GO TO 300 50 PRINT G 60 LET N=N+1 70 LET G1=G+G1 80 GO TO 30 300 LET X=G1 310 LET Y=N 320 LET Z=X/Y 330 LET R1=X-Z*Y 340 LET D1=10*R1/Y 350 LET R2=10*R1-D1*Y 360 LET D2=10*R2/Y 370 LET R3=10*R2-D2*Y 380 LET D3=10*R3/Y 390 PRINT "THE AVERAGE IS---";Z;".";D1;D2;D3 400 STOP 410 GO TO 2 ```