User Profile

Collapse

Profile Sidebar

Collapse
pythonnoob
pythonnoob
Last Activity: Feb 28 '08, 03:50 AM
Joined: Oct 24 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pythonnoob
    replied to Outputting Points between numbers
    in C
    Those numbers are meant to be the output, not the input. The program i am trying to generate will take (x1,y1) and (x2.y2) and find every possible point that exists between them.

    For input -3,5 5,-3 I would expect an output of:
    -3, 5 -2, 5 -1, 5 0, 5 1, 5 2, 5 3, 5 4, 5 5, 5
    -3, 4 -2, 4 -1, 4 0, 4 1, 4 2, 4 3, 4 4, 4 5, 4
    -3, 3 -2, 3 -1, 3 0, 3 1, 3 ...
    See more | Go to post

    Leave a comment:


  • pythonnoob
    replied to Outputting Points between numbers
    in C
    And sorry for that last post. I meant to edit that out, i realized that was extremely impatient; expecially for how unclear i may have been.
    See more | Go to post

    Leave a comment:


  • pythonnoob
    replied to Outputting Points between numbers
    in C
    thanks for your reply. I want to find the numbers between between 2 sets of ordered pairs. So between say -3,5 and 5,-3 would be

    -3, 5 -2, 5 -1, 5 0, 5 1, 5 2, 5 3, 5 4, 5 5, 5
    -3, 4 -2, 4 -1, 4 0, 4 1, 4 2, 4 3, 4 4, 4 5, 4
    -3, 3 -2, 3 -1, 3 0, 3 1, 3 2, 3 3, 3 4, 3 5, 3
    -3, 2 -2, 2 -1, 2 0, 2 1, 2 2, 2 3, 2 4, 2 5, 2...
    See more | Go to post

    Leave a comment:


  • pythonnoob
    started a topic Outputting Points between numbers
    in C

    Outputting Points between numbers

    Im new to programming, expecially c++. I started off in python but really just know the basics.

    My question is, how would i go about writing a program that would output all of the numbers (whole numbers) on a plane between X and Y, saw 0,0 and 10,10?

    I can get my code to write the basics from 0-10 with a while loop, but only for 1 axis.

    [code=cpp]
    #include<iostre am>


    ...
    See more | Go to post
    Last edited by sicarie; Feb 27 '08, 03:29 AM. Reason: Code tags

  • pythonnoob
    replied to help with append and delete
    Thanks for your help, i think i got it!

    [CODE=python]# database
    # Query on database

    def query(course, grade):
    courseindex=dat abase[0].index(course)
    for record in range(1,len(dat abase),1):
    if database[record][courseindex]==grade:
    print database[record][0]
    print("\n")
    raw_input("pres s enter to continue\n\n\n" )
    ...
    See more | Go to post
    Last edited by bartonc; Oct 24 '07, 09:36 PM. Reason: Added =python to code tags

    Leave a comment:


  • pythonnoob
    replied to help with append and delete
    That makes sense. Im sure this is an easy function, but i dont see how to use append. By using global, i see that i can modify the database, but i dont see how i could append what i need to where i need to?
    See more | Go to post

    Leave a comment:


  • pythonnoob
    replied to help with append and delete
    I see the changes you made to the first function. Would what i had originally have worked?
    See more | Go to post

    Leave a comment:


  • pythonnoob
    replied to help with append and delete
    I see what you are saying here, but this code was already written. I am trying to modify someone elses code and create functions with what is already give.
    See more | Go to post

    Leave a comment:


  • pythonnoob
    started a topic help with append and delete

    help with append and delete

    Hello everyone. New to python as well as this forum, but i must say ive learned a but already reading through some posts. Seems to be a pretty helpful community here.

    Before i post a question ill give you a little background. I have done programming in the past in Basic, VB, and a little C. I am not much of a programmer, its more of a hobby/curiosity.

    The following code is not mine, i am trying to modify a template...
    See more | Go to post
No activity results to display
Show More
Working...