- #1
BodenD
- 2
- 0
Homework Statement
Write a user-defined function that calculates grade point average (GPA) on a scale of 0 to 4 ...
https://41.media.tumblr.com/4f5e8ee38181d7c584c234138f632714/tumblr_nmnhq9p8jo1usetlso1_1280.png
The Attempt at a Solution
I'm getting the error that "function definitions are not permitted in this context"
And details says "A nested function cannot be defined in a control statement"
I don't really understand how to use functions. What can I do to fix this?
Oh and I took out that extra "end"
Last edited by a moderator: