Add code?

This is the place for queries that don't fit in any of the other categories.

Add code?

Postby tolgaa » Mon May 20, 2013 8:41 pm

Code: Select all
print ("1. Nokta : ")
x1=int(input("x:"))
y1=int(input("y:"))
print ("2. Nokta")
x2=int(input("x:"))
y2=int(input("y:"))
dx=x2-x1
dy=y2-y1
m=dy/dx
n = y1-m*x1
print ("Denklem : y =%sx+%s"%(m,n))


Modify the program you wrote for so that the input is read from a text file
(input.txt) and the output is written to another text file (output.txt).
Last edited by micseydel on Mon May 20, 2013 8:48 pm, edited 1 time in total.
Reason: Added code tags, locked OP because it's probably homework.
tolgaa
 
Posts: 2
Joined: Sun Apr 07, 2013 9:45 am

Re: Add code?

Postby micseydel » Mon May 20, 2013 8:55 pm

Yoriz told you at your first post that you need to read this.

We really do want to help you with your assignment, but it's very offensive for you to post your homework here as if we're just going to do it for you.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1255
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Add code?

Postby Kebap » Mon May 20, 2013 11:33 pm

tolgaa wrote:
Code: Select all
print ("1. Nokta : ")
x1=int(input("x:"))
y1=int(input("y:"))
print ("2. Nokta")
x2=int(input("x:"))
y2=int(input("y:"))
dx=x2-x1
dy=y2-y1
m=dy/dx
n = y1-m*x1
print ("Denklem : y =%sx+%s"%(m,n))


Modify the program you wrote for so that the input is read from a text file
(input.txt) and the output is written to another text file (output.txt).
Quoted for reference
Learn: How To Ask Questions The Smart Way
Join the #python-forum IRC channel on irc.freenode.net and chat with uns directly!
Kebap
 
Posts: 390
Joined: Thu Apr 04, 2013 1:17 pm
Location: Germany, Europe

Re: Add code?

Postby micseydel » Mon May 20, 2013 11:41 pm

Kebap, I already locked the OP, and noted it. I think I've seen you do it before when I've locked them. Please check for that next time :)
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1255
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to General Coding Help

Who is online

Users browsing this forum: Bing [Bot] and 3 guests