User Profile

Collapse

Profile Sidebar

Collapse
Metalhead
Metalhead
Last Activity: Jan 4 '08, 11:54 PM
Joined: Oct 22 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Metalhead
    started a topic Eclipse Pydev

    Eclipse Pydev

    Hi,
    I have been experimenting with the Pydev plugin for the Eclipse IDE. I had hoped that the console would be fully interactive in the same way as the python idle.
    If I write a program that has a print statement, for example, this is displayed in the console view, but what if I want to initiate a new class and check that it is working correctly which will involve actually typing in some code to see what values are returned etc.?...
    See more | Go to post

  • Metalhead
    replied to Loops (and the in operator) [solved]
    If you do't mind being patient once more, can this be simplified :-

    if namestring != 'Rachel' and namestring != 'Jack' and namestring != '':
    See more | Go to post

    Leave a comment:


  • Metalhead
    replied to Loops (and the in operator) [solved]
    Thanks for all the help. You've been patient!!!

    Heres something funny. I copied your code with debug points into a new window, saved it as a new file and ran it. It worked fine. Then I took all of your debug points out and ran it again. It worked perfectly.
    Then I loaded my original code and it wouldn't run, yet line by line it looks exactly the same. I can't explain that I'm afraid :-)

    Thanks again
    ...
    See more | Go to post

    Leave a comment:


  • Metalhead
    replied to Loops (and the in operator) [solved]
    By the way, I think the names should be capitalized, but there is no difference when i do this.
    t
    See more | Go to post

    Leave a comment:


  • Metalhead
    replied to Loops (and the in operator) [solved]
    Hi,
    This is the code. I was just playing around with a simple program that would amuse kids and would teach me about using
    simple loops.
    the age value always seems to be 0. I would also like a bit of code to ask the name again if the wrong name was input.

    thanks!!!

    Code:
    from time import sleep
    age = 0
    print 'hello'
    sleep(5)
    print 'I bet I can tell whether you are telling
    ...
    See more | Go to post

    Leave a comment:


  • Metalhead
    replied to Loops (and the in operator) [solved]
    I had given age an initial value age = 0 at the start of the program, but this isn't in the loop by the way

    tim
    See more | Go to post

    Leave a comment:


  • Metalhead
    replied to Loops (and the in operator) [solved]
    Thanks for all the help, but one last question!!!
    Now, even if the name is entered correctly and assigned to namestring, the age value is not altered.
    Any ideas?

    Thanks,
    Tim
    See more | Go to post

    Leave a comment:


  • Metalhead
    replied to Loops (and the in operator) [solved]
    the age is indented by the way. It just did not show on the message

    tim
    See more | Go to post

    Leave a comment:


  • Metalhead
    replied to Loops (and the in operator) [solved]
    Thanks for the replies. I've solved most of the problem. Can someone tell me why this dooes not work

    namestring = input("WHAT IS YOUR NAME?" )
    while namestring == 'Jack':
    age = 9
    while namestring == 'Rachel':
    age = 7

    I'm trying to set a value for age depending on what name was entered.
    Also, is there a way to make Python ignore upper,lower case or a command along th...
    See more | Go to post

    Leave a comment:


  • Metalhead
    started a topic Loops (and the in operator) [solved]

    Loops (and the in operator) [solved]

    Hi,
    I'm new to Python and OO in general. I am trying to set up a simple loop based around an inputed answer to a question, so that if you input a wrong answer, you are asked the question again, but if correct, the program moves on.

    For example:
    What is the capital of France?

    Correct answer - move on to next question. Wrong answer. Repeat the question

    I used to write in basic years ago in...
    See more | Go to post
No activity results to display
Show More
Working...