Использование ЭВМ при обучении математики
Рефераты >> Математика >> Использование ЭВМ при обучении математики

COLOR 7, 0

OPEN FILEHLP$ FOR INPUT AS #1

S = 0

DO

ON ERROR GOTO 0

LINE INPUT #1, stran$

S = S + 1

LOOP UNTIL EOF(1)

CLOSE #1

IF FIX(S / 18) >= (S / 18) THEN KS = FIX(S / 18) ELSE KS = FIX(S / 18) + 1

DIM stran$(S)

OPEN FILEHLP$ FOR INPUT AS #1

FOR i = 1 TO S

ON ERROR GOTO 0

LINE INPUT #1, stran$(i)

NEXT i

CLOSE #1

NS = 1

GOSUB stran

obrabotka:

a$ = INKEY$

IF a$ = CHR$(0) + CHR$(73) THEN NS = NS - 1: GOSUB stran

IF a$ = CHR$(0) + CHR$(81) THEN NS = NS + 1: GOSUB stran

IF a$ = CHR$(27) THEN ERASE stran$: SCREEN 9, , 0, 0: RETURN

GOTO obrabotka

stran:

IF NS < 1 THEN NS = 1: RETURN

IF NS > KS THEN NS = KS: RETURN

n = 18 * NS

LOCATE 1, 1

PRINT "г"; STRING$(64, "="); "T=============¬"

PRINT "¦"; STRING$(15, " "); : COLOR 15, 0: PRINT "ИНФОРМАЦИОННО - СПРАВОЧНАЯ СИСТЕМА"; : COLOR 7, 0: PRINT STRING$(15, " ");

IF NS < 10 THEN PRINT "¦ Страница "; NS; "¦" ELSE PRINT "¦ Страница"; NS; "¦"

PRINT "¦"; STRING$(64, " "); "L=============¦"

FOR i = n - 17 TO n

IF i > S THEN PRINT "¦"; STRING$(78, " "); "¦" ELSE PRINT "¦ "; stran$(i); STRING$((76 - LEN(stran$(i))), " "); "¦"

NEXT i

PRINT "L"; STRING$(78, "="); "-"

'COLOR 1, 7:

PRINT " Выход - Esc ";

'IF NS = 1 THEN COLOR 8, 7 ELSE COLOR 1, 7

PRINT " Предыдущая страница - PageUp ";

'IF NS = KS THEN COLOR 8, 7 ELSE COLOR 1, 7

PRINT " Следующая страница - PageDown "

COLOR 7, 0

RETURN

analis:

PRINT #3, "Варианты ответов ученика:";

ccc = 10

COLOR ccc

LOCATE 9, 58: PRINT " "

LOCATE 10, 58: PRINT "AB ( ; )"

PRINT #3,

PRINT #3, "координата x вектора AB ";

vectx1:

p = 11: GOSUB slov

mm = 3: nx = 10: ny = 63

l$ = "+-1234567890"

m$ = "": m = 0

GOSUB napis

PRINT #3, VAL(m$);

IF abx <> VAL(m$) THEN GOSUB glupo: GOTO vectx1

PRINT #3,

PRINT #3, "координата y вектора AB ";

vecty1:

p = 12: GOSUB slov

mm = 3: nx = 10: ny = 69

l$ = "+-1234567890"

m$ = "": m = 0

GOSUB napis

PRINT #3, VAL(m$);

IF aby <> VAL(m$) THEN GOSUB glupo: GOTO vecty1

ccc = 14

COLOR ccc

LOCATE 13, 53: PRINT TAB(56); " _"

LOCATE 14, 53: PRINT er; TAB(56); "*AB= m( ; )"

PRINT #3,

PRINT #3, "координата x вектора m ";

vectx3:

p = 15: GOSUB slov

mm = 3: nx = 14: ny = 64

l$ = "+-1234567890"

m$ = "": m = 0

GOSUB napis

PRINT #3, VAL(m$);

IF er * abx <> VAL(m$) THEN GOSUB glupo: GOTO vectx3

PRINT #3,

PRINT #3, "координата y вектора m ";

vecty3:

p = 16: GOSUB slov

mm = 3: nx = 14: ny = 70

l$ = "+-1234567890"

m$ = "": m = 0

GOSUB napis

PRINT #3, VAL(m$);

IF er * aby <> VAL(m$) THEN GOSUB glupo: GOTO vecty3

ccc = 14: p = 5: GOSUB slov

vectm:

GOSUB telo

'Обработка ошибки правильности построения вектора m

mmx = curx - curoldx: mmy = cury - curoldy

IF mmx <> abx * er OR mmy <> aby * er THEN GOSUB glupo: PRINT #3, : PRINT #3, "Построил вектор m("; mmx; ","; mmy; ")"; : CIRCLE (x1, y1), radius, 12: ccccc = ccc: ccc = 12: GOSUB strvect: ccc = ccccc: GOTO vectm

p = 20: GOSUB slov

IF glupo = 0 THEN colora(shag) = 4: coob$ = " Нет ошибок ": GOSUB shar

IF glupo = 1 THEN colora(shag) = 14: coob$ = " Одна ошибка ": GOSUB shar

IF glupo = 2 THEN colora(shag) = 2: coob$ = " Две ошибки! ": GOSUB shar

IF glupo = 3 THEN colora(shag) = 9: coob$ = " Три ошибки! ": GOSUB shar

IF glupo > 3 THEN colora(shag) = 15: coob$ = " Много ошибок!!! ": GOSUB shar

oshibka = oshibka + glupo

glupo = 0

COLOR colora(shag): LOCATE 20, 52: PRINT coob$: COLOR ccc

DO WHILE INKEY$ = "": LOOP

RETURN

napis:

LOCATE nx, ny: PRINT STRING$(mm, " ")

napis1:

k$ = ""

DO WHILE k$ = ""

LOCATE nx, ny: PRINT CHR$(95)

k$ = INKEY$

IF k$ = CHR$(0) + CHR$(59) THEN GOSUB reklama

LOOP

k = ASC(k$)

IF k = 13 AND m <> 0 THEN LOCATE nx, ny: PRINT " ": RETURN

IF k = 27 THEN GOSUB vihod

IF k = 8 AND m <> 0 THEN m = m - 1: m$ = LEFT$(m$, m): LOCATE nx, ny: ny = ny - 1: PRINT " ": GOTO napis1

IF INSTR(1, l$, k$) = 0 OR m = mm THEN GOTO napis1

m = m + 1:

m$ = m$ + k$: LOCATE nx, ny: PRINT k$: ny = ny + 1

GOTO napis1

vihod:

vih$ = ""

SCREEN 9, , 1, 1

CLS

LOCATE 10, 10

PRINT "Выйти из программы - <Esc>"

DO WHILE vih$ = ""

vih$ = INKEY$

IF vih$ = CHR$(27) THEN CLS : PRINT #3, "Выход из программы по желанию пользователя - "; TIME$: PRINT #3, : CLOSE #3: GOTO alis

LOOP

SCREEN 9, , 0, 0

RETURN

alis:

CLS

LOCATE 10, 30: PRINT "GOOD BYE !!!"

DO WHILE INKEY$ = "": LOOP

FOR i = 1 TO 120

LINE (i + 200, 140)-(i + 240, 120), 0

SOUND i * 3 + 1100, .05

FOR j = 1 TO speed: NEXT j

NEXT i

SYSTEM

slov:

COLOR 15

IF p < 10 THEN slovo$(1) = " Перемещай стрелку по ": slovo$(2) = " координатной плоскости ": slovo$(3) = "пользуясь клавишами " + CHR$(27) + CHR$(24) + CHR$(25) + "->": slovo$(4) = " Клавишей <ПРОБЕЛ> укажи "


Страница: