replace with body function
Option 6 (3 marks) \#\#\#\#\#\#\#\# \# \#\#\#\#\#\# \#\# \# \# \#\#\#\#\#\# Positionsofnegs (theNums) : \# Pre-condition: * theNums is a list of numbers \# Post-condition: \# Returns a list containing the positions of al1 of the \# negative numbers in theNums * Examples: \# PositionsofNegs ([1,2,3,4,5]) returns [2,4] \# Positionsofnegs ([4,7,18]) returns [] \# Positionsofnegs ([0,3,5,9,17]) returns [1,2,3,4] return None \# Code stub: replace with function body \# Option 7 (3 marks) \#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# def Remainders (theNums, d) : \# Pre-condition: \# theNums is a list of integers d is an integer \# Post-condition: Returns a list containing the remainders obtained when dividing each of the numbers in theNums by d Examples: Remainders ([0,1,2,3],3)=[0,1,2,0] Remainders ([12,14,16,8],3)=[0,2,1,2] Remainders ([1,7,2,9],4)=[1,3,2,1] Remainders ([1,3,8,7],6)=[5,3,2,1] Remainders ([1,3,8,7],6)=[1,3,4,5] return None \# Code stub: replace with function body \#\#\#\#\# \#\# F \#\# \# \# \#\# Option 8 (3 marks) ef Listofsigns (theNums) : \# Pre-condition: theNums is a list of numbers Post-condition: Return value is a result list containing strings, each of which indicates the gign (positive, negative or zero) of the number at that position in theNums If the number in position i is positive, result[i] is '+' If the number in position i is negative, result [i] is ' 1 If the number in position i is zero, result [i] is 0 Example: Listofsigns ([21,9,0,6]) returns [,,,0,+] return None \# Code stub: replace with function body \# Option 9 (4 marks) def ProductofPositives (theNums) : \# Pre-condition: thenums is a list of numbers Post-condition: Return value is the product of just the positive numbers in theNums If theNums contains no positive numbers the function should return 999 - Note: the product of two numbers a and b is a times b return None \# Code stub: replace with function body