'I'm getting infinite loop and array is not printing as well

noOfStudent = int(input("Enter Number of Student : "))

while range(noOfStudent):
    subjectArray = []
    markArray = []
    studentName = input("Enter Student Name : ")
    noOfSubject = int(input("Eneter Number of Subjects : "))
    totalMark = 0

    while range(noOfSubject):
        subjectName = input("Enter Subject Name : ")
        subjectArray.append(subjectName)
        mark = int(input("Enter Mark :"))
        markArray.append(mark)
        break
    
    totalMark = totalMark + mark

    average = totalMark / noOfSubject
    print(studentName,subjectArray,markArray)
    subjectArray.reverse()
    markArray.reverse()
    print(studentName,subjectArray,markArray)
    subjectArray.clear()
    markArray.clear()
    print(studentName,subjectArray,markArray)

Array is taking entries of the data but studentName is running infinitely other than that it is not printing the Average as well as marks it just keep taking entries and nothing else

I want students name with their subjects and marks as well as total of their marks along with avg



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source