Mark asks…

QBASIC Computer Program….needing assistance…?

REM EXAMPLE #1 (PASSWORD GUESSING GAME)
LET SECRET$ = “JENNIFER”
DO WHILE X$ SECRET$
PRINT ” PLEASE TRY TO GUESS THE PASSWORD”
PRINT ” IT IS THE FIRST NAME OF SOMEONE IN THE CLASS”
PRINT ” PLEASE TYPE IN YOUR GUESS AND PRESS ENTER”
INPUT X$
LOOP
PRINT ” CONGRATULATIONS – YOU HAVE GUESSED THE PASSWORD”
END

Okay so I have to take that program and add this to it

“Modify the password guessing program above to give the user only 5 tries at guessing the password. The program will alert the user with each try, how many tries are left. After 5 tries it will print “Sorry you failed to guess the password correctly”"

I have an ICT class in grade 9 and I’ve been stuck on this for like 3 hours.

Any help would be nice. Thank you (:
@Teh Shet

Nice name lawlz…..

Anyway, I tried your answer and it works great.

Except when you’re on the last try (5th), if you try to type in the CORRECT password it says it FAILS.
All the turns before that (1st-4th) if you type in the right password it works.
I don’t understand, and I got my ICT teacher to look at it and even he didn’t understand.

Can you explain why it does so?

Thanks again TEH SHEEET.

Jeff.

Free PC Help staff answers:

Oh okay dude i Got it, It is because I have added an

if yourmom = 5 then end <==== This means that it ends there which it should not

If you remove that you would be able to see that it works perfectly.

So The Bottom line is You need to put the if yourmom = 5 then end before next i

then it will work perfectly.

PS: Your teacher is a dumbass for not noticing it, so am i.

So the Code will be :-

CLS
LET password$ = "Jennifer"
LET yourmom = 0
FOR i = 1 TO 5
IF done = 3 THEN END
PRINT "Please Try to Guess The Password."
PRINT ""
PRINT "It is the first name of Someone in the Class"
PRINT ""
PRINT "please type in your Guess and press Enter"
PRINT ""
INPUT "Please Insert the Password Now : ", x$
PRINT ""
LET yourmom = yourmom + 1
IF yourmom = 1 THEN PRINT "You have Entered a Wrong Guess, You have 4 More Attempts"
IF yourmom = 1 THEN PRINT ""
IF yourmom = 2 THEN PRINT "You have Entered a Wrong Guess, You have 3 More Attempts"
IF yourmom = 2 THEN PRINT ""
IF yourmom = 3 THEN PRINT "You have Entered a Wrong Guess, You have 2 More Attempts"
IF yourmom = 3 THEN PRINT ""
IF yourmom = 4 THEN PRINT " You have Entered a Wrong Guess, You have 1 More Attempt"
IF yourmom = 4 THEN PRINT ""
IF yourmom = 5 THEN PRINT "You have wasted all your chances"
IF yourmom = 5 THEN PRINT ""
IF x$ = password$ THEN CLS
IF x$ = password$ THEN PRINT "Congratulations"
IF x$ = password$ THEN PRINT ""
IF x$ = password$ THEN PRINT "You have Guessed The Password"
IF x$ = password$ THEN LET done = 3
IF yourmom = 5 THEN END
NEXT i
END

Michael asks…

I need ASSISTANCE!!!! lol good computer program!!!?

Hi!

I’m Heather!

I’m BORED!

SOOOO

I need HELP!!!

I want a COMPUTER PROGRAM

(FREE)
to download or use online

and maybe be beneficial to me in some way…
SOOO
do you know one???
Something like Accelerated Reader or Accelerated Math? I want something along those lines…

Any ideas…?
keeps points…
etc…

BTW im a VERY advanced 8th ( so I’ve been told) grader so plzz choose accordingly :P

Peace Out !

GOOD LUCK!

Yea..Must have gotten in the wrong category…

I didn’t mean to get nerd responses four and counting!

PUHLEASE

AN EIGHTH GRADER HAS BETTER ANSWERS!!

FYI

I have a job! haha

Free PC Help staff answers:

OKAY HEATHER

I AM HERE TO HELP U

I AM BORED TOO SO U CAN JOIN ME ON MY YAHOO SOMETIME..LOL

GO TO www.download.com

PEACE

CHEERS, LATERZ.

Nancy asks…

Computer programming homework assistance please?

Using RAPTOR, can you develop the logic to print your name 10 times.
Then modify to print any name that is entered 10 times.
Please try to be specific with how you completed this. Also, please do not answer if you do not know what RAPTOR is. Thanks!

Free PC Help staff answers:

I have no idea what RAPTOR is (nor do I care). However, all Programming Languages support loops, and that’s what you must use. You welcome.

Carol asks…

Computer Assistance!?

Okay computer geniuses I need help. Okay I have a HP Mini Net-book 110-11 okay this net-book is not working. When you start up the net-book it starts on this program called a Splash-top you can stay there or switch over to Windows 7. Okay that’s the problem I click the button to go to Window 7 but I doesn’t work. I says there a malfunction and it askes me if I want to start up the computer in Safe mode normally or the last configuration that worked. I click either or and the whole system re-boots. Any suggestions of what to do? Okay I don’t want people typing “Call tech support”. If I don’t get answer that works I’ll call okay? Please help I need files from the Window 7 branch ;(!
I already tried that! :(

Free PC Help staff answers:

I don’t know how to fix Windows 7. You will probably have to call tech support on that (sorry).

However, to get your files off the hard drive ASAP, you can use a Linux Live USB OS. Slax is an easy one to use. URL below.

Install it on a USB drive 200MB or larger.

Plug it in, and boot* from the USB drive. It will boot up a Linux OS separate from Windows, and you can go into your old folders and copy them over to the USB drive or to another external storage device. There is a slight learning curve to using slax, but it’s similar enough to Windows to where you can figure where everything is.

*The key to enter the BIOs / Boot Menu varies from computer to computer, but it usually says something like “Press F2 to enter setup” or “Press Del to enter Boot Menu” as soon as you turn on the computer. Once in, change it so that the USB drive is the first device in the list of Boot devices.

Linda asks…

I need to download a good Remote Assistance Program?

I had a program downloaded a while back and can’t remember the name of it for the life of me! It was a quick and easy download and was completely free. I also remember it giving me a password that i had to give to the other person in order for them to gain access to my computer. Recognition in the program i am seeking would be greatly appreciated.

Thanks to all, Angie
AH! Thank you thank you thank you! Teamviewer is exactly what I was looking for!

Free PC Help staff answers:

Download TeamViewer.

Powered by Yahoo! Answers


Other PC Help Sites Online

    Google BookmarksGoogle ReaderLiveJournalTumblrTechnorati FavoritesShare

    Related posts:

    1. Your Questions About Computer Assistance Jenny asks… computer assistance? computer on boot up only goes...
    2. Your Questions About Computer Assistance Uk Lizzie asks… Masters In Computer Science From UK? i m...
    3. Your Questions About Online Pc Repair Maria asks… How do you become A+ certified, im taking...
    4. Your Questions About Computer Network Support Jobs Maria asks… Is it too diffucult too find a computer...
    5. Your Questions About Onsite Computer Repair Donald asks… does charging a cheaper price encourage more customers?...