Issue
http://tekknolagi.co.cc/cgi-bin/helloworld.py
that's the output
what i would like it to do is make a pyramid shape
here's the code...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # enable debugging import cgitb cgitb.enable() print "Content-Type: text/plain;charset=utf-8" print for i in range(1,10): x = "hi "*i print x.rjust(40) for i in range(1, 10): x = " hi"*i print x.ljust(40)
how do i get it to do that?
Solution
print x.rjust(40) + x.ljust(40)
Answered By - Alex
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.