Example Rainbow Hearts

ASnake Documentation

Table Of Contents

    Generates a rainbow heart pattern randomly based on seed. Due to randomness, the result will differ depending on the seed, but should produce the same result when prettyPicture is provided the same seed.

    Code:

    import random
    prettyPicture does
      str heartSprites "๐Ÿ’œโค๏ธ๐Ÿงก๐Ÿ’›๐Ÿ’š๐Ÿ’™๐Ÿ–ค๐Ÿ’œโค๏ธ"
      list display []
      for y in range(1, len(str(x)))
       x is x - int("1"*y)
       display.append("".join([heartSprites[int(j)] for j in (str(x)+str(x)[::-1])]))
      return display
    from x
    int randomNumber is pipe 0,999999999 to random.randint
    list final is randomNumber to prettyPicture
    print "\n".join(final)+"\n"+"\n".join(final)[::-1]
    f"\nNumber: {randomNumber}"
    

    (Potential) Result:

    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œโค๏ธ๐Ÿงกโค๐Ÿ’›๐Ÿ’›โค๐Ÿงก๏ธโค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œโค๏ธ๐Ÿงก๐Ÿ’œ๐Ÿงก๐Ÿงก๐Ÿ’œ๐Ÿงก๏ธโค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œโค๏ธโคโค๏ธ๏ธโคโค๏ธโค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œโคโค๐Ÿ’œ๐Ÿ’œโคโค๐Ÿ’œ๐Ÿ’œโคโค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ–คโคโค๐Ÿ–ค๐Ÿ’œ๐Ÿ’œ๐Ÿ–คโคโค๐Ÿ–ค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ–ค๐Ÿ’™๐Ÿ’œ๐Ÿ’œ๐Ÿ’šโคโค๐Ÿ’š๐Ÿ’œ๐Ÿ’œ๐Ÿ’™๐Ÿ–ค๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’š๐Ÿ’™๐Ÿ’š๐Ÿ–ค๐Ÿ–ค๐Ÿ’›๐Ÿ’œ๐Ÿ’œ๐Ÿ’›๐Ÿ–ค๐Ÿ–ค๐Ÿ’š๐Ÿ’™๐Ÿ’š๐Ÿ’œ๐Ÿ’›
    ๐Ÿงกโค๐Ÿ’›๐Ÿ’š๐Ÿ’›๐Ÿ’™๐Ÿ’™๐Ÿงก๐Ÿ–ค๐Ÿ–ค๐Ÿงก๐Ÿ’™๐Ÿ’™๐Ÿ’›๐Ÿ’š๐Ÿ’›โค๐Ÿงก
    ๐Ÿงกโค๐Ÿ’›๐Ÿ’š๐Ÿ’›๐Ÿ’™๐Ÿ’™๐Ÿงก๐Ÿ–ค๐Ÿ–ค๐Ÿงก๐Ÿ’™๐Ÿ’™๐Ÿ’›๐Ÿ’š๐Ÿ’›โค๐Ÿงก
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’š๐Ÿ’™๐Ÿ’š๐Ÿ–ค๐Ÿ–ค๐Ÿ’›๐Ÿ’œ๐Ÿ’œ๐Ÿ’›๐Ÿ–ค๐Ÿ–ค๐Ÿ’š๐Ÿ’™๐Ÿ’š๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ–ค๐Ÿ’™๐Ÿ’œ๐Ÿ’œ๐Ÿ’šโคโค๐Ÿ’š๐Ÿ’œ๐Ÿ’œ๐Ÿ’™๐Ÿ–ค๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ–คโคโค๐Ÿ–ค๐Ÿ’œ๐Ÿ’œ๐Ÿ–คโคโค๐Ÿ–ค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œโคโค๐Ÿ’œ๐Ÿ’œโคโค๐Ÿ’œ๐Ÿ’œโคโค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œโค๏ธโคโค๏ธ๏ธโคโค๏ธโค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œโค๏ธ๐Ÿงก๐Ÿ’œ๐Ÿงก๐Ÿงก๐Ÿ’œ๐Ÿงก๏ธโค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    ๐Ÿ’›๐Ÿ’œ๐Ÿ’™๐Ÿ’œโค๏ธ๐Ÿงกโค๐Ÿ’›๐Ÿ’›โค๐Ÿงก๏ธโค๐Ÿ’œ๐Ÿ’™๐Ÿ’œ๐Ÿ’›
    
    Number: 406892315
    
    Scroll to top