Answered You can hire a professional tutor to get the answer.

QUESTION

python flowchart for the following program #Function to get student term index def getTerm(pv_students = ):

python flowchart for the following program

#Function to get student term index

def getTerm(pv_students = []):

   lv_term = 0

   lv_valid = False

   lv_termCode = ""

   lv_termDesc = ""

   while not lv_valid:

         print(" "*20 + "="*30)

         print(format(0, "25") + ": Exit")

         for lv_termIndex in range(0, len(pv_students)):

             lv_termCode = pv_students[lv_termIndex][0][0]

             lv_termDesc = pv_students[lv_termIndex][0][1]

             print(format(lv_termIndex + 1, "25") +": "+ lv_termDesc + "(" + lv_termCode + ")")

         print(format("","20")+"="*30)

         lv_userInput = input("Which term would you like to process: ")

         lv_userInput = lv_userInput.replace(" ", "")

         lv_valid = lv_userInput.isnumeric()

         if lv_valid:

             lv_term = int(lv_userInput)

             lv_valid = lv_term >= 0 and lv_term <= len(pv_students[lv_termIndex])

   return (lv_term - 1)

main()

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question