Ad
  • Default User Avatar

    Curious, i find good numbers but there is a gap in the numerotation....???
    for exemple 100 in the place 92
    The generation of the automorphic number can give more than one for each.
    For exemple is done :
    1
    5
    6
    25
    76
    376
    625
    625
    9376
    9376
    ....
    is 625 number 6 or 7
    or delete one of them

  • Default User Avatar

    Python 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license()" for more information.

    m= ("""
    dfllllll
    drrurrdu
    rrlruldu
    rrrrrrru
    """)
    type(m)
    <class 'str'>
    liste=m.splitlines()
    print(liste)
    ['', 'dfllllll', 'drrurrdu', 'rrlruldu', 'rrrrrrru']

    no error

    The robot anwnser :
    File "/workspace/default/solution.py", line 2, in path_counter
    liste=m.splitlines()
    AttributeError: 'list' object has no attribute 'splitlines'

  • Default User Avatar

    I still not understood : The begin of my program is :
    def path_counter(m):
    liste = m.split()

    m is a string
    The awnser is :
    File "/workspace/default/solution.py", line 2, in path_counter
    liste = m.split()
    AttributeError: 'list' object has no attribute 'split'

  • Default User Avatar

    curiously no problem with microsoft visual studio ?

  • Default User Avatar

    it's not very kind...
    I learn python
    you should learn kindess

  • Default User Avatar

    liste=m.split()
    is not accept when more than 2 lines

  • Default User Avatar

    I found the solution :
    hex_val='1dc41525'
    print(binascii.a2b_hex(hex_val))

    result=b'\x1d\xc4\x15%'

  • Default User Avatar

    no backslashe in \x1d ? :-)
    \x1d have the value of 1d (in hexadecimal) or 29 in decimal
    \x1d is a byte the same with b'0x1d'
    i want to change b'0x1d' in \x1d
    and then concate with other \x... to make \x1d\xc4\x15\x25\x91\xe6\x09\x59\x04\x99\x15\x29\x0a\x45\x21\x29 for exemple

  • Default User Avatar

    in hexdump(data) with \x1d\xc4\x15\x25\x91\xe6\x09\x59\x04\x99\x15\x29\x0a\x45\x21\x29 we find 1d c4 15 25 91 e6 09 59 04 99 15 29 0a 45 21 29
    Then in the way back 1d c4....is transform in \x1d\xc4.....

  • Default User Avatar

    No it's in the other way :

    transform a="1a" => aa=str.encode(hex(int(a,16))) give b'0x1a' but i can't transform it in b'\x1a' and then concatene with the others bytes

    thanck you

  • Default User Avatar

    Hello,
    i don't see how transform 1a 2b in b'\x1a\x2b' because the '\' is forbiden in string (need two \)

  • Default User Avatar

    It's very curious :
    On my computer the anwnser to the test is ["e", "ddd", "aa"] with frequences 7,5,3
    The same for the second test

    the awnser to the test give me :
    Incorrect frequencies: [7, 5, 2] should be [7, 5, 3]. Your output: ['e', 'ddd', 'cc']. One possible output: ['e', 'ddd', 'aa']
    Incorrect match: words not present in the string. Your output: ["won't", ' wont']. One possible valid answer: ["won't", 'wont']

    ????????????

  • Default User Avatar

    Hello,
    i used Try/except of Python

    My program give "False" for testing 2544470768F9

    but the test says :

    Testing for 2544470768F9
    It should give an error for invalid input: True should equal False

    Is it forbiden to use Try/except ??

    OK I don't see :
    "It should give an error for invalid input",lambda: luck_check('6F43E8'))
    Curious....

  • Default User Avatar

    The test is not verry clear about "'"

    top_3_words(" //wont won't won't "), ["won't", "wont"]) then we keep words with "'" in the word "won't"
    top_3_words(" ' "), []) then we don't keep "'"....

  • Default User Avatar

    If the shift is initially 1, the first character of the message to be encoded will be shifted by 1, the second character will be shifted by 2, etc...

    I suppose that :

    If the shift is initially 13, the first character of the message to be encoded will be shifted by 13, the second character will be shifted by 14(13+1)or by 26(26+26)

    I rewrite my solution and it was the first solution : shift shift+1 shift+2 and so on

  • Loading more items...