Advertisement
Nenogzar

Untitled

Feb 3rd, 2024
1,067
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.12 KB | None | 0 0
  1. """ 1 """
  2. # print('\n'.join(
  3. #     ([''.join
  4. #       ([("promenliva"[(x-y)%8]
  5. #         if((x*0.05)**2+(y*0.1)**2-1)
  6. #          **3-(x*0.05)**2*(y*0.1)
  7. #          **3<=0 else ' ')
  8. #         for x in range(-30,30)])
  9. #             for y in range(15,-15,-1)])))
  10.  
  11. """ 2 """
  12. # promenliva = input("Input name: ")
  13. # name_length = len(promenliva)
  14. #
  15. # print('\n'.join(
  16. #     ([''.join
  17. #       ([promenliva[(x-y) % name_length]
  18. #         if((x*0.05)**2 + (y*0.1)**2 - 1)**3 - (x*0.05)**2 * (y*0.1)**3 <= 0 else ' '
  19. #         for x in range(-30, 30)])
  20. #             for y in range(15, -15, -1)])))
  21.  
  22. """ 3 """
  23.  
  24.  
  25. def generate_pattern(input_name):
  26.     name_length = len(input_name)
  27.     pattern = '\n'.join([''.join([input_name[(x - y) % name_length]
  28.                                   if ((x * 0.05) ** 2 + (y * 0.1) ** 2 - 1) ** 3 - (x * 0.05) ** 2 * (
  29.                 y * 0.1) ** 3 <= 0 else ' '
  30.                                   for x in range(-30, 30)])
  31.                          for y in range(15, -15, -1)])
  32.     return pattern
  33.  
  34.  
  35. input_name = input("Input name: ")
  36. result = generate_pattern(input_name)
  37. print(result)
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement