Q:

Function isn't being called/not found?

I'm brand new to Haskell and I'm not so familiar with the syntax. I've got a pure function that has 2 integer parameters and then want to call another function and change the value of one parameter with the return value from the called function. However I get an error "No modules loaded". Is there any way to change the value of a variable.
EDIT This breaks the fundamental of functional programming as every variable is a constant to keep it pure. This is admirable as it allows for more secure code due to not need to worry about overwritten memory.
Here is the code:
percentage A B = (A/B)

grades x y  = do
   if y /= 0 then do  
      x <- percentage x y
      if x > 1 then "Error"
      else
        <code>
   else "Error"

Here is how I define it:
percentage :: Double -> Double -> Double
grades :: Double -> Double -> String

I've looked already at other threads and online but none seem to cover the changing of a parameter.

A:

You need to change the the type of grades and dispense with the inappropriate do notation; you aren't doing any monadic calculations. Also, variables must start with lowercase letters; capitalized names indicate a type or type class.
percentage :: Double -> Double -> Double
percentage a b = a / b

grades :: Double -> Double -> Either String Double
grades x 0 = Left "Zero denominator"
grades x y = let p = percentage x y
             in if p > 1 then Left "Greater than 100%"
                         else Right p

Another alternative is to pre-define the error conditions that occur, rather than returning arbitrary strings to describe them; not every string will describe one of the two possible errors, but every value of PercentageError does.
data PercentageError = ZeroDenominator | Over100Percent

grades :: Double -> Double -> Either PercentageError Double
grades x 0 = Left ZeroDenominator
grades x y = let p = percentage x y
             in if p > 1 then Left Over100Percent
                         else Right p

