Fibbonacci

  • Aizria
    29th Aug 2010 Member 0 Permalink
    Felix

    Felix:
    Awesan:
    Excimer-Sun-Software What's that supposed to mean?

    It is the 13:th or 14:th fibonacci number.

    Exactly. One of my favorites, too, for some reason.
  • triclops200
    29th Aug 2010 Former Staff 0 Permalink
    #!/usr/bin/env python
    print "Content-type: text/plain\n"
    print "Hello World!"
    a,b,c,d = 0,1,1,0
    while d < 10000:
    print c
    d = d+1
    c = a + b
    a = b
    b = c

    That is the source of that web-page, but you can't see that . I found a way to program in python for web-pages.
  • Aizria
    29th Aug 2010 Member 0 Permalink
    triclops200

    triclops200:
    print c
    d = d+1
    c = a + b

    The statement "d = d + 1" can be written "d += 1", which reads "d equals itself plus one".

    By the way, how are you doing the Python as a CGI script? I'd like to possibly do this with a web page that I'm working on instead of having to use PHP.
  • triclops200
    29th Aug 2010 Former Staff 0 Permalink
    what server site you using?
    and I know +=, but I wasn't sure if python had it, I'm a C, C++, and C# man.
  • Aizria
    29th Aug 2010 Member 0 Permalink
    None yet. It's going to take me a little while yet to finish the site because I'm writing all of the code for it by hand. Do you have a particular server that you would reccommend?

    Yes, Python has all of the standard augmented assignment operators. eg. +=, -=, /=, *=, and %=
  • triclops200
    29th Aug 2010 Former Staff 0 Permalink
    X10 hosting, check them out, Unlimited bandwidth and space + CGI and PHP and ASP NET, if I can ever get the ASP working right, their server has issues with it.
  • Aizria
    29th Aug 2010 Member 0 Permalink
    O.O I just looked at their website and they've got to be the best free hosting service that I've ever seen! Thanks for telling me about this! I was wondering what I was going to do about a server for my site and was having a hard time finding a good host. Thanks again!
  • Felix
    29th Aug 2010 Member 0 Permalink
    You can most likely use any programming language to program web applications. Python is no exception.
  • Aizria
    29th Aug 2010 Member 0 Permalink
    Felix

    Yes, I'm aware that such things can be written in: PHP, Ruby, Java, Perl, Python, and others. I just prefer Python.
  • triclops200
    29th Aug 2010 Former Staff 0 Permalink
    No problem