Weekly Qbasic and Qb64 Lesson Topics
March 24, 2025, 06:10:29 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

What I have so Far,Learning program

Pages: 1 [2]
  Print  
Author Topic: What I have so Far,Learning program  (Read 2078 times)
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #15 on: June 15, 2011, 12:46:14 am »

Code:
SCREEN 12

WIDTH 40
CLS
COLOR 15: LOCATE 10, 12: PRINT SPACE$(20)
COLOR 14: LOCATE 10, 12: INPUT "Enter your Name: ", name$
IF UCASE$(name$) = UCASE$(name$) THEN PRINT "Hello "; name$; " Hope you enjoy this little program "


DO

    COLOR 14, 2
    PLAY "2a4g8e12g4a4a"
    PRINT "Press the LETTER please"
    az = INT(RND * 26) + 65
    PRINT CHR$(az)
    '-------------------------------------------
    WHILE Letter$ <> CHR$(az)
        INPUT "Letter: ", Letter$ 'somewhere in here, I want it to print message if the letter is not correct
        Letter$ = UCASE$(Letter$)

        IF Letter$ = CHR$(az) THEN
            PRINT " Good "; name$; " You wrote "; Letter$
        ELSE
            PRINT "Wrong ,you wrote "; Letter$; " Please Try again "; CHR$(az)
        END IF
    WEND

    _DELAY 1
    CLS
LOOP UNTIL _KEYDOWN(27)
SLEEP
SYSTEM   
From Garry
« Last Edit: June 15, 2011, 12:48:33 am by GarrisonRicketson » Report Spam   Logged


Pages: 1 [2]
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy