This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def shuffleClass(pupilsList, noToBeMoved): | |
# validate inputs first | |
#check if pupils list is a valid list | |
if not isinstance(pupilsList, list): | |
return [] | |
#check if noToBeMoved is a valid integer | |
if not isinstance(noToBeMoved, int): | |
return pupilsList | |
classSize = len(pupilsList) | |
#if pupils list contains just one element or noToBeMoved is zero return it |