Answered You can hire a professional tutor to get the answer.

QUESTION

def babylonian (symbols) : numbers = for symbol in symbols: result = 0 ten = 0 one = 0 if symbol == "T" : one += 1 elif symbol == "" :

:    numbers = []    symbol symbols:        result =         ten =         one =         symbol == :            one +=         symbol == :            ten +=         symbol == :            result ==         result = ten * + one        numbers.append(result)    numbers

below is the output

the symbol sequence [, ]: [0, 0]Testing babylonian() the symbol sequence [, ]: [10, 1]Testing babylonian() the symbol sequence [, ]: [0, 10]Testing babylonian() the symbol sequence [, TTTTTT"]: [0, 0, 0]Testing babylonian() for the symbol sequence ["<<<TTTTTTT<TTTT<<<<<"]: [0, 10, 0, 0, 0]

I expected the entire symbols to be read, but i think it stops at the first letter :(((

Did i do something wrong in the for loop?

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question