cmpt assign.pdf Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User...

1 answer below »
Computer Science Assignment: Questions and extra guidelines attached.


cmpt assign.pdf Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User __MACOSX/._cmpt assign.pdf provided/areaCode/areaCode.pyde from final_q6 import areaCode TESTS = 1 passed = 0 input = "3061234567" if areaCode(input) != "the area code is 306": print("Test failed for input: " + input) else: passed += 1 result = str(passed) + "/" + str(TESTS) + " test cases passed" print(result) provided/areaCode/final_q6.py # put your name and personal info here! def areaCode(number): # TODO: WRITE YOUR ANSWER HERE!! return None # You'll need to return something more useful instead! provided/classnames/class1.txt Big,Bird Cookie,Monster Elmo provided/classnames/classnames.pyde from final_q8 import fullnames TESTS = 1 passed = 0 inputs = "class1.txt" answers = ["Big Bird", "Cookie Monster", "Elmo"] if fullnames(inputs) != answers: print("Error found for input: " + str(inputs)) else: passed += 1 result = str(passed) + "/" + str(TESTS) + " test cases passed" print(result) provided/classnames/final_q8.py # put your name and personal info here def fullnames(filename): #TODO: Put your answer here! return None # You'll need to return something more useful instead! provided/count_O/count_O.pyde from final_q7 import count_O TESTS = 1 passed = 0 inputs = ["coookies"] answers = [3] for i in range(len(inputs)): if count_O(inputs[i]) != answers[i]: print("Test failed for input: " + inputs[i]) else: passed += 1 result = str(passed) + "/" + str(TESTS) + " test cases passed" print(result) provided/count_O/final_q7.py # put your name and personal info here! def count_O(C): # TODO: WRITE YOUR ANSWER HERE!! return None # You'll need to return something more useful instead! provided/final_q1.txt You can write your sentence for q1 here. provided/final_q5/final_q5.pyde # put your name and personal info here # TODO: This is a complete interactive program, so you'll need to complete all the parts as normal def setup(): return def draw(): return def mouseClicked(): return def keyPressed(): return provided/foodsafety/final_q2.py # put your name and personal info here! def pass_course(grades): # TODO: write your answer here! return None # You'll need to return something more useful instead! provided/foodsafety/foodsafety.pyde from final_q2 import pass_course TESTS = 1 passed = 0 inputs = [80, 70] if pass_course(inputs) != True: print("Error found for input: " + str(inputs)) else: passed += 1 result = str(passed) + "/" + str(TESTS) + " test cases passed" print(result) provided/passGrade/final_q4.py # put your name and personal info here! def passGrade (grade, passGrade): # TODO: WRITE YOUR ANSWER HERE!! return None # You'll need to return something more useful instead! provided/passGrade/passGrade.pyde from final_q4 import passGrade TESTS =1 passed = 0 input = 75 input2 = 60 if passGrade(input, input2) != "Congratulation! You are passed!": print("Test failed for input: ") print(input) else: passed += 1 result = str(passed) + "/" + str(TESTS) + " test cases passed" print(result) provided/performanceCheck/final_q3.py # put your name and personal info here! def performanceCheck(yearGrades, termName): # TODO: WRITE YOUR ANSWER HERE!! return None # You'll need to return something more useful instead! provided/performanceCheck/performanceCheck.pyde from final_q3 import performanceCheck TESTS = 1 passed = 0 inputs_1 = {'spring':85, 'summer':87, 'fall': 79, 'winter':92} inputs_2 = 'spring' if performanceCheck(inputs_1, inputs_2) != 'good': print("Test failed for input: " + input_2) else: passed += 1 result = str(passed) + "/" + str(TESTS) + " test cases passed" print(result) provided/shoppingList/final_q9.py # put your name and personal info here! def shoppingList(items): # TODO: WRITE YOUR ANSWER HERE!! return None # You'll need to return something more useful instead! provided/shoppingList/shoppingList.pyde from final_q9 import shoppingList TESTS = 1 passed = 0 input = {"Apple": True, "banana": False, "Orange": False} if shoppingList(input) != ['banana', 'Orange']: print("Test failed for input: " ) print(input) else: passed += 1 result = str(passed) + "/" + str(TESTS) + " test cases passed" print(result)
Answered Same DayDec 11, 2021

Answer To: cmpt assign.pdf Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User Mobile User...

Sumit answered on Dec 11 2021
133 Votes
provided/areaCode/areaCode.pyde
from final_q6 import areaCode
TESTS = 1
passed = 0
input = "3061234567"
if areaCode(input) != "the area code is 306":
print("Test faile
d for input: " + input)

else:
passed += 1

result = str(passed) + "/" + str(TESTS) + " test cases passed"
print(result)
provided/areaCode/final_q6.py
# put your name and personal info here!
def areaCode(number):
    n = len(number)
    if(n < 3):
        return "input is too short"
    else:
        return "the area code is " + number[0] + number[1] + number[2]
provided/classnames/class1.txt
Big,Bird
Cookie,Monster
Elmo
provided/classnames/classnames.pyde
from final_q8 import fullnames
TESTS = 1
passed = 0
inputs = "class1.txt"
answers = ["Big Bird", "Cookie Monster", "Elmo"]
if fullnames(inputs) != answers:
print("Error found for input: " + str(inputs))
else:
passed += 1

result = str(passed) + "/" + str(TESTS) + " test cases passed"
print(result)
provided/classnames/final_q8.py
# put your name and personal info here
def fullnames(filename):
file = open(filename, 'r')
Lines = file.readlines()
ans = []
for line in Lines:
line = line.rstrip('\n')
ans.append(line.replace("," , " "))
return ans

provided/count_O/count_O.pyde
from final_q7 import count_O
TESTS = 1
passed = 0
inputs = ["coookies"]
answers = [3]

for i in range(len(inputs)):
if count_O(inputs[i]) != answers[i]:
print("Test failed for input: " + inputs[i])
else:
passed += 1

result = str(passed) + "/" + str(TESTS) + " test cases passed"
print(result)
provided/count_O/final_q7.py
# put your name and personal info here!
def count_O(C):
    count = 0
    i = 0
    n =...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here