Jump to content

[SOLVED] ok i have no common sense


serverman

Recommended Posts

first i want to say i know this is  a stupid question

 

im working on a script that has grades in it ...in the database you start out with 100

i want the quiz grade to average with the master grade

 

mathematical how is that done?

 

im sorry lol im just not sure how

 

Link to comment
Share on other sites

its -10 for each wrong

 

 

here is an example how it works

 

if ($q9 == "d"){
echo "9)".$q9." <font color='#33FF66'>Right</font> <br>";
}
else{
echo "9)".$q9." <font color='#FF0000'>wrong</font> <br>";
$w = $w - $v ;}

oh and v = 10 and w= 100

 

 

 

Link to comment
Share on other sites

ok i figured it out

 

 

here is how for anyone who reads this later on

 

here is database layout

username|id|emal|ect...|numofquiz|quizgrade

 

numofquiz is the number of quizzes taken and all quiz are worth 100 points

 

so at the end of each quiz it adds points earned to what was already there in points and add +1 to quizgrade

 

now to get the grade  you do this

numofquiz*100= mostpoint

mostpoints/quizegrade=x

x*100= grade

:)

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.