Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. #!/usr/bin/python
  2. print "Content-type: text/html"
  3. print
  4. print "<html><head>"
  5. print ""
  6. print "</head><body>"
  7.  
  8. import cgi
  9. form = cgi.FieldStorage()
  10. result = 0
  11. numberN = form["numberN"].value
  12. if isinstance(numberN, int) and numberN > 0
  13.     for x in range(0, numberN)
  14.         result += x
  15.  
  16. print result
  17.  
  18. print "</body></html>"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement