Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Pyton code

  • 03-04-2014 6:58pm
    #1
    Registered Users, Registered Users 2 Posts: 63 ✭✭


    Hi all could some one change this code from python to HTML please.:) I get a compilation error the way it is.
    [code}
    {o = 0
    m = 0
    y = 0
    x = 0
    str_n = input(" Enter the number of coins N in the chest ")
    num_n = int(str_n)
    x = num_n % 3
    num_n = num_n - 3
    num_n = num_n / 3
    y = num_n
    m = num_n + 1
    o = num_n + 2

    if x > 0:
    print "-1"
    input("Press Enter to esc")

    else:
    print (str(o) + " " + str(m) + " " + str(y))
    input("Press Enter to esc")}
    [/code]


Comments

  • Registered Users, Registered Users 2 Posts: 2,032 ✭✭✭colm_c


    You can't convert Python to HTML period.

    Python is a programming language
    HTML is a markup language

    You could convert it to HTML and Javascript, or you could convert it to a server-side python application which generates HTML and the python does the logic.

    What are you trying to learn/achieve?

    You need to make a stab at it yourself, no-one is going to do your homework for you!


  • Registered Users, Registered Users 2 Posts: 63 ✭✭Emmet Manning 99


    I already worked out the code from a problem we were given in python but can't get it to work in HTML.


Advertisement