can this be implemented?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • greenflame

    #1

    can this be implemented?

    First I should start with some introductory comments.

    When I first learned about programming, I started with BASIC, QBASIC
    to be more accurate. While I was at that stage, I learned about the
    INPUT command. I used it abundantly.

    Ok so now for the actual issue.

    I would like to implement something like the INPUT command from BASIC.
    I failed to find something on the python website documentation for
    beginners.

    Thank you for your time.

  • Dan Bishop

    #2
    Re: can this be implemented?

    On Jun 2, 6:54 pm, greenflame <alikakak...@ya hoo.comwrote:
    First I should start with some introductory comments.
    >
    When I first learned about programming, I started with BASIC, QBASIC
    to be more accurate. While I was at that stage, I learned about the
    INPUT command. I used it abundantly.
    >
    Ok so now for the actual issue.
    >
    I would like to implement something like the INPUT command from BASIC.
    I failed to find something on the python website documentation for
    beginners.
    var = raw_input("Ente r a value for var: ")

    That gives you a string; if you want a number, convert it by using the
    int or float constructor.

    Comment

    • greenflame

      #3
      Re: can this be implemented?

      On Jun 2, 5:05 pm, Dan Bishop <danb...@yahoo. comwrote:
      On Jun 2, 6:54 pm, greenflame <alikakak...@ya hoo.comwrote:
      >
      First I should start with some introductory comments.
      >
      When I first learned about programming, I started with BASIC, QBASIC
      to be more accurate. While I was at that stage, I learned about the
      INPUT command. I used it abundantly.
      >
      Ok so now for the actual issue.
      >
      I would like to implement something like the INPUT command from BASIC.
      I failed to find something on the python website documentation for
      beginners.
      >
      var = raw_input("Ente r a value for var: ")
      >
      That gives you a string; if you want a number, convert it by using the
      int or float constructor.
      Thanks a lot! That helped a lot!

      Comment

      • Gabriel Genellina

        #4
        Re: can this be implemented?

        En Sat, 02 Jun 2007 20:54:29 -0300, greenflame <alikakakhel@ya hoo.com>
        escribió:
        When I first learned about programming, I started with BASIC, QBASIC
        to be more accurate. While I was at that stage, I learned about the
        INPUT command. I used it abundantly.
        >
        Ok so now for the actual issue.
        >
        I would like to implement something like the INPUT command from BASIC.
        I failed to find something on the python website documentation for
        beginners.
        This BASIC program:

        INPUT "Your name"; z$
        PRINT "Hello, "; z$

        would be this in Python:

        name = raw_input("Your name? ")
        print "Hello,", name

        raw_input is a built-in function, see


        --
        Gabriel Genellina

        Comment

        Working...