Problem with PythonPrintHexStr task

Back to Problem Solutions forum

vidu333     2015-02-01 08:29:10

When I try to run this code by hitting the Python 3 button it works and also in my local Python3.4 env. I get the right answer too but when I try to submit I get this error:

**For 'A0!' we got 'Error: Unknown instruction import in the line 1! ...' which is incorrect :(

My code:

import sys
import string

input_line = input()
hex_list =list()

string_list = list (input_line)

for a in string_list :
    hex_list.append((hex(ord(a)))[2:])

for a in hex_list :
    a= str.upper(a)
    print(a,end='')

Any ideas why?

vidu333     2015-02-01 08:34:20

Never mind- I just re-read it :

*Your solution should be a valid source for Intel 4004 emulator!

TestUser     2015-02-01 08:45:24
User avatar

Yes, you are correct :)

Sorry for this bewilderment - I hope that in future I'll be able to add some system which can warn you in such cases. Thanks for this idea!

UPD TestUser is the same as Admin - I'm just in process of testing updated design.

Please login and solve 5 problems to be able to post at forum