def myName(): return "Khalid" def myBlazerID(): return "khalid12" # Call these functions print("My Name is =", myName(), " and my BlazerId is =",myBlazerID()) # isOdd function def isOdd(n1): # If n1...

I have the solution but just needs to be fixed. I have attached the questions and solution. It won't take a long time. Thanks


def myName(): return "Khalid" def myBlazerID(): return "khalid12" # Call these functions print("My Name is =", myName(), " and my BlazerId is =",myBlazerID()) # isOdd function def isOdd(n1): # If n1 is integer if type(n1) is int: # Return if n1 is odd return n1 % 2 == 1 # Else return false else: return False # tupleCounter function def tupleCounter(t): count = 0 # If type of t is tuple if type(t) is tuple: # Iterate over each number in t for number in t: # If number is odd if isOdd(number): # Increment count by 1 count += 1 # Return count return count # cubeOfOdd function def cubeOfOdd(n2): # Iterate from 1 to n2 in steps of 2 for i in range(1,n2,2): # Print i cubed print(i**3) # paintTheRoom function def paintTheRoom(length, width, height): # Calculate area of ceiling and 4 walls area = length*width + 2*(width*height) + 2*(width*height) # Calculate number of gallons gallons = area / 400 # If gallons has a decimal component if gallons > int(gallons): # Return integer value of gallons + 1 return int(gallons) + 1 # Else no decimal component else: # Return integer value of gallons return int(gallons) # stringMerge function def stringMerge(s1): # If string length is less than 2 if len(s1) < 2: # return empty string return "" # else return first two chars + last two chars else: return s1[:2] + s1[-2:] # interestingmerge function def interestingmerge(l2, l3): result = [] # iterate over each element in l2, sorted for i in sorted(l2): # iterate over each element in l3, sorted for j in sorted(l3): # if second element is divisible by first element if j % i == 0: # add tuple of elements to result list result.append((i, j)) # return result list return result 2:="" #="" return="" empty="" string="" return="" ""="" #="" else="" return="" first="" two="" chars="" +="" last="" two="" chars="" else:="" return="" s1[:2]="" +="" s1[-2:]="" #="" interestingmerge="" function="" def="" interestingmerge(l2,="" l3):="" result="[]" #="" iterate="" over="" each="" element="" in="" l2,="" sorted="" for="" i="" in="" sorted(l2):="" #="" iterate="" over="" each="" element="" in="" l3,="" sorted="" for="" j="" in="" sorted(l3):="" #="" if="" second="" element="" is="" divisible="" by="" first="" element="" if="" j="" %="" i="=" 0:="" #="" add="" tuple="" of="" elements="" to="" result="" list="" result.append((i,="" j))="" #="" return="" result="" list="" return="">
Feb 27, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here