how to write a script contain list of questions

hi
i want to write a script that contain questions upto 50..when i run the script it has to ask the questions one by one with options like a,b,c,d and user has to answer the each question and finally result (contain how many user selected correctly)
please help me...i need hints to do....
waiting for your valuble reply...

please post what have you tried till now..
smells like homework for me

thanks for your reply...
the problem is i dont no how to do..means where to start.. and clearly i have mentioned in my thread i need only hints to do..means that i want to know how to do...some steps(hints)...
i heard that we need to connect to database..etc...i am beginner to shell script..

well...after googled a lot i got somwthing to do...
here is my code..

while read line
do
echo $line
done < questions.txt

and questions.txt contain all the questions..
the output is coming like this

srinivas@opensolaris:~$ ./tryingscript.sh 
capital of Hungery
a.budapest
b.paris
c.pitsburgh
d.i dont no
your choice:
The longest river in the world
a.ganga
b.nile
c.bramhaputra
d.dont no
your choice :

Niagara Falls was discovered by
a.jhonny
b.Louis Hennepi
c.kempson
d.adrew heko
your choice:
srinivas@opensolaris:~$ 

but it has to wait untill user submitted any option...but it is not waiting...
so any help....

So your reading the questions from a flat file, and
I'm assuming everthing that was printed out in your
example (aside from your command line and system prompts)
is in that flatfile.

If so then my hint is that:

When the $line = "Your choice :"

you need to read user input.

Currently, your script does not do this.

yes you are right..reading from a flat file..
but still i am confused...where i have to place that code..i tried..but no use....
can you tell me..

I thought you were looking for hints.

Hint: After the echo of the line you need to stop
to collect user input.

Problem: You've redirected input into the while loop command.

Hint: You need to solve this problem for it all to work.

Hint: man your shell (i.e. man ksh) and look at the built in 'read' (not man read)

Hint: while in the shell man page, look up 'exec' too.

Your input file should contain like this the ans should be separated by :

#cat file1

wHAT IS THE capital of INDIA ? a)newdelhi b)newyork c)newsland d)none :a

Here is a sample code

while read line
do

echo $line | cut -d ':' -f1
ans=`echo $line | cut -d ':' -f2`

read -p "Enter Your Answer : " USERANS

# here you can add check if the user has given correct format (a,b,c,d not any other charater)
correctans=0
wrongans=0

if [ $ans -eq $USERANS ]
then
#increment correctans counter
else

#increment wrongans counter

fi

done < file1

echo "you answered $correctans correctly"

thanks for your help..i got lots of information by doing shell scripting..
i tried sample code...but i am getting some errors..
i tried to debug...but i was unable to solve..
here is the output..
while running the script it is not waiting for user unput(we have specified to read user input)
...but it is not executing..

srinivas@opensolaris:~$ ./tryingscript.sh
capital of Hungery? a)budapest b)paris c)pitsburgh d)i dont no
./tryingscript.sh: line 39: [: a: integer expression expected
Niagara Falls was discovered by? a)jhonny b)Louis Hennepi c)kempson d)adrew heko
./tryingscript.sh: line 39: [: b: unary operator expected
you answered 0 correctly

here is questions.txt file

srinivas@opensolaris:~$ cat questions.txt
capital of Hungery? a)budapest b)paris c)pitsburgh d)i dont no:a
The longest river in the world? a)ganga b)nile c)bramhaputra d)dont no:b
Niagara Falls was discovered by? a)jhonny b)Louis Hennepi c)kempson d)adrew heko:b