Question: from cisc 1 0 8 import assert _ equal def convert _ operator ( ch ) : if c h = = ? ' +

from cisc108 import assert_equal
def convert_operator(ch):
if ch==?'+':
return 1
elif ch=='-':
return -1
else:
return 0
f= open ('plus and minus.txt')
data =f*read()
total =0
for s in data:
total += convert_operator(s)
print(total)
f.close()
assert_equal()
 from cisc108 import assert_equal def convert_operator(ch): if ch==?'+': return 1 elif

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!