preview of python program as simple introductioncode fragment presents python program that computes the grade-point average (gpafor student based on letter grades that are entered by user many of the techniques demonstrated in this example will be discussed in the remainder of this at this pointwe draw attention to few high-level issuesfor readers who are new to python as programming language python' syntax relies heavily on the use of whitespace individual statements are typically concluded with newline characteralthough command can extend to another lineeither with concluding backslash character (\)or if an opening delimiter has not yet been closedsuch as the character in defining value map whitespace is also key in delimiting the bodies of control structures in python specificallya block of code is indented to designate it as the body of control structureand nested control structures use increasing amounts of indentation in code fragment the body of the while loop consists of the subsequent linesincluding nested conditional structure comments are annotations provided for human readersyet ignored by the python interpreter the primary syntax for comments in python is based on use of the characterwhich designates the remainder of the line as comment printwelcome to the gpa calculator printplease enter all your letter gradesone per line printenter blank line to designate the end map from letter grade to point value points : : : : : : : : : : : : num courses total points done false while not donegrade inputread line from user empty line was entered if grade =done true elif grade not in pointsunrecognized grade entered print("unknown grade { being ignoredformat(grade)elsenum courses + total points +points[gradeavoid division by zero if num courses printyour gpa is { format(total points num courses)code fragment python program that computes grade-point average (gpa