MrCBASIC/1/1.TXT

1 line
2.5 KiB
Plaintext
Raw Normal View History

2019-05-10 19:10:54 +00:00
10 CLS:PRINT" THIS IS EXERCISE 1" 12 CALL MOVETO(20,30):INPUT" IS IT THE ONE YOU WANTED? Y/N "; ANS$ 13 IF ANS$ = "Y" THEN 17 15 IF ANS$= "N" THEN RUN "GRAM 1" 16 BEEP:GOTO 12 17 CLS 18 CALL MOVETO(20,30):INPUT"PLEASE TYPE IN AND ENTER YOUR NAME", NOMEN$ IF NOMEN$="" THEN BEEP:GOTO 18 A=0:SCORE=0:CICI=0 ON ERROR GOTO 22 OPEN NOMEN$ FOR INPUT AS #1 19 IF EOF(1) THEN 20 INPUT #1, N,S IF N=1 THEN A=1 GOTO 19 20 CLOSE #1 IF A>0 THEN 21 OPEN NOMEN$ FOR APPEND AS #1 N=1 S=SCORE PRINT#1,N,S CLOSE#1 GOTO 23 21 PRINT"" PRINT" YOU HAVE ALREADY DONE THIS EXERCISE." INPUT" PLEASE PRESS THE 'RETURN' KEY"; V CLS RUN "GRAM 1" 22 PRINT"":PRINT"" PRINT" NAME NOT FOUND." INPUT" PLEASE PRESS THE 'RETURN' KEY"; V CLS CLEAR GOTO 17 23 CALL MOVETO(20,50):PRINT"THANK YOU.":FOR DL=1 TO 3000:NEXT DL CLS PRINT" IF YOU WILL WANT TO QUIT BEFORE THE EXERCISE ENDS, " PRINT" INPUT 'QUIT' FOR THE CHOICE OF NOUN. REMEMBER THIS." PRINT"" PRINT" THE COMPLETE EXERCISE HAS 25 ITEMS, AND" PRINT" YOU WILL BE ABLE TO DO IT ONLY TWICE, IF YOU DO IT OVER" PRINT" RIGHT AWAY AT THE CHOICE AT THE END." PRINT"" INPUT"TO GET GOING, PRESS THE 'RETURN' KEY.", V TOT=25 25 CLS:SCORE =0:ITEM=0:TRY=0:CORRECT=0 26 TIM$=TIME$ 27 TIM=VAL(RIGHT$(TIM$,1))+1 28 ON TIM GOTO 500,503,506,510,513,517,519,525,530,537 30 ITEM=ITEM+1:IF ITEM>=26 THEN 600 31 J1$="":J2$="":J3$="":J4$="":J5$="":AT=1 32 CLS:CALL MOVETO(20,20):PRINT NOMEN$" SENTENCES LEFT "25-ITEM" SCORE "SCORE"%" 33 CALL TEXTFONT(CHICAGO):CALL MOVETO(20,50):PRINT"Exercise Sentence:" 34 CALL TEXTFONT(12):CALL MOVETO(20,70):PRINT S$ 40 CALL MOVETO(20,100):INPUT"TYPE IN A NOUN FROM THE SENTENCE."; N$ 41 IF N$="" THEN BEEP:GOTO 40 42 IF N$="QUIT" THEN 600 43 IF N$=N1$ OR N$=N2$ OR N$=N3$ OR N$=N4$ OR N$=N5$ THEN 50 44 CALL MOVETO(20,150):PRINT"SORRY, THAT IS NOT A NOUN. TRY ANOTHER WORD.":SOUND 60,5,0:FOR DL=1 TO 2000:NEXT DL 45 TRY=TRY+1:SCORE = INT(100*(CORRECT/TRY)) 46 CLS:GOTO 32 50 IF N$=N1$ AND J1$<>"" THEN GOTO 62 51 IF N$=N1$ THEN J1$="YOU" 52 IF N$=N2$ AND J2$<>"" THEN GOTO 62 53 IF N$=N2$ THEN J2$="YOU" 54 IF N$=N3$ AND J3$<>"" THEN GOTO 62 55 IF N$=N3$ THEN J3$="YOU" 56 IF N$=N4$ AND J4$<>"" THEN GOTO 62 57 IF N$=N4$ THEN J4$="YOU" 58 IF N$=N5$ AND J5$<>"" THEN GOTO 62