Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > The IT Pro > Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Programming A discussion forum for programs and programming used in tech-related businesses.

Closed Thread
 
LinkBack Thread Tools
Old 10-24-2009, 08:09 AM   #1 (permalink)
Registered User
 
Join Date: Apr 2009
Posts: 34
OS: Red Hat 9/win xp pro


[SOLVED] python help!

hey guys its newbiegeek again with more syntax errors. this time its a program made to make slope intercept equations. here is the first block and i already have problems. when i run, i get a window saying, " theres an error in your program:
*** cant assign to function call (C:/directory directory you get the idea) line 2"
the code is as follows:
Code:
def SIform ():
    x(1) = input('enter the x value of the first point: ');
    y(1) = input('enter the y value of the first point: ')
    #those numbers are the first point i.e. (x,y)
    x(2) = input('enter the x value of the second point: ')
    y(2) = input('enter the y value of the second point: ')
    #these numbers are the second point i.e. (x,y)
    M = (y(2) - y(1)) / (x(2) - x(1))
any help would be appriciated.
newbiegeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 10-27-2009, 02:49 PM   #2 (permalink)
Registered User
 
Join Date: Sep 2009
Posts: 5
OS: winxp


Re: python help!

Its been awhile since I have used Python, however I believe you do not need the semi-colon and that may be your problem. I have only needed to use that when using C++. Just as a suggestion because I have had a few problems when trying to do this myself make sure that all of the variables are floating points because you will not be able to divide properly and only get the integer version.

James Weber
Small Business IT Support

Last edited by dcghelp; 10-27-2009 at 02:51 PM.
dcghelp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 10-28-2009, 07:03 PM   #3 (permalink)
Registered User
 
Join Date: Apr 2009
Posts: 34
OS: Red Hat 9/win xp pro


Re: python help!

actually, i never had it do anything with the variable "m" after having it print what m equals, it worked
newbiegeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 11-01-2009, 09:12 PM   #4 (permalink)
God (TSF Enthusiast)
 
ahmorrow's Avatar
 
Join Date: May 2009
Location: Jeffersonville, IN
Posts: 858
OS: Ubuntu 9.10 [Karmic Koala]

My System

Send a message via AIM to ahmorrow Send a message via Yahoo to ahmorrow
Re: python help!

Could you post the whole source and not just the snippet? Or at least post that snippet with it's dependencies?
ahmorrow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 11-02-2009, 06:20 AM   #5 (permalink)
Registered User
 
Join Date: Apr 2009
Posts: 34
OS: Red Hat 9/win xp pro


Re: python help!

i got it to work. thats what i said. problem solved
newbiegeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 11-08-2009, 05:03 PM   #6 (permalink)
God (TSF Enthusiast)
 
ahmorrow's Avatar
 
Join Date: May 2009
Location: Jeffersonville, IN
Posts: 858
OS: Ubuntu 9.10 [Karmic Koala]

My System

Send a message via AIM to ahmorrow Send a message via Yahoo to ahmorrow
Re: python help!

Then mark it as such.

Go up to the top post:

Thread Tools-->Mark as Solved
ahmorrow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 03:56 AM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85