Advertisement
Sitisom

lab 6

Mar 25th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. header = input()
  2. h1_color = input()
  3. p_color = input()
  4. h1_text = input()
  5. p_text = input()
  6.  
  7.  
  8. def dec(func):
  9.     def wrapper(header_f, h1_color_f, p_color_f, h1_text_f, p_text_f):
  10.         print("<html>\n<head>")
  11.         func(header_f, h1_color_f, p_color_f, h1_text_f, p_text_f)
  12.         print("</body>\n</html>")
  13.     return wrapper(header, h1_color, p_color, h1_text, p_text)
  14.  
  15.  
  16. @dec
  17. def f(header_f, h1_color_f, p_color_f, h1_text_f, p_text_f):
  18.     print("<title>{0}</title>\n"
  19.     "<style>h1{{color:{1}}}p{{color:{2}}}</style>\n"
  20.     "</head>\n"
  21.     "<body>\n"
  22.     "<h1>{3}</h1>\n"
  23.     "<p>{4}</p>".format(header_f, h1_color_f, p_color_f, h1_text_f, p_text_f))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement