Weekly Qbasic and Qb64 Lesson Topics
April 19, 2024, 09:59:33 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 1657 times)
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« on: June 11, 2011, 07:27:04 pm »

I was going back thru this, and allthough I understand some, there is something I can not quite figure out,...
Code:
DO
    PRINT "Press the LETTER please"
    z = INT(RND * 26) + 66
    PRINT CHR$(z)
    WHILE Letter$ <> CHR$(z)
        INPUT "Letter: ", Letter$ '//// somewhere in here, I want it to print "sorry, that is not the correct letter, try again " if the letter is not correct
        Letter$ = UCASE$(Letter$)
    WEND
    PRINT " Bien,te escribe ,Good You wrote "; Letter$
    _DELAY 1
    CLS
LOOP UNTIL _KEYDOWN(27)

PRINT "Sorry , thats all for now"
SLEEP
SYSTEM
Ok hope I make sense, as it is, if the letter is not correct, it just displays:
LETTER:  and what I was trying to do is make it say "sorry try again" (or somethin like that) if the letter did not match,.. If the correct letter is entered, it dose say:  " Bien,te escribe ,Good You wrote " and a new letter appears , with the LETTER: prompt,...that part is fine,
since this is not a IF statement I caouldnt use ELSE, WHILE and WEND, are new to me.
Thanks From Garry
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