User Profile

Collapse

Profile Sidebar

Collapse
imish06
imish06
Last Activity: Nov 14 '08, 02:47 AM
Joined: Oct 23 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • imish06
    replied to I have a question about While loops
    I tried that and it didn't work. I keep getting the same message: "not all arguments converted during string formatting."

    Code:
    #creat empty lists to hold even and odd numbers
    even = []
    odd = []
    #create a message giving the directions
    mess = "Enter a non-negative number to add to the lists or a negative number to stop"
    #get input from the user
    val = raw_input(mess)
    #while
    ...
    See more | Go to post

    Leave a comment:


  • imish06
    started a topic I have a question about While loops

    I have a question about While loops

    This is the question:

    "The user must enter a non-negative number to add to the lists or a negative number to stop the program. For every non-negative number entered, place each even and odd number in its respective list. Print the lists of even and odd numbers at the end of the program. You must use a while loop."

    This is my code and algorythm:
    Code:
    #create empty lists to hold even and odd numbers
    ...
    See more | Go to post
    Last edited by numberwhun; Oct 23 '08, 05:56 PM. Reason: Please use code tags
No activity results to display
Show More
Working...