Python GPA Calculator
Avoid global variables

There's no good reason for the variables classes and grades to be defined and manipulated in global scope.
For example, it would be better to pass grades into the calculate function as a parameter.

Consider a table-driven solution

The long if-else chain is tedious.
You could instead use a dictionary to map the grade notes to scores:

score_map = {
    'A': 4,
    'C': 2,
    'C-': 1.7,
    'D': 1,
    # ... and so on
}
total = 0
for grade in grades:
    total += score_map[grade]


This approach also makes it easy to use a list-comprehension that's more compact than a for loop:

return sum(score_map[grade] for grade in grades) / 6


Usability

Making the user enter the class names seems rather pointless.
The program simply prints them back, without doing anything interesting with them.

Style

The parentheses are redundant here:


while (y &lt;= 5):



Instead of y = y + 1 you can use the augmented assignment form y += 1.

Python has a style guide called PEP8 with a utility to spot such issues.