do
`If spacebar is pressed randomise an ascii code for a lower case letter, and print it in character form
if spacekey()=1
ascii=rnd(24)+98
cls
print chr$(ascii)
wait 100
endif
`If control is pressed randomise an ascii code for an upper case letter, and print it in character form
if controlkey()=1
ascii=rnd(24)+66
cls
print chr$(ascii)
wait 100
endif
loop
All the letters on the keyboard (and quite a few off) can be represented by number codes. a to z lower case is 97 to 122, and upper case A to Z is 65 to 90. This code randomizes an ascii code and puts it into character form using the chr$() function.
Brains are for idiots.
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM