x=int(input('Enter the values for X'))
y=int(input('Enter the values for Y'))
if x > 0 and y > 0:
print ('x, y point lies in the First quandrant')
elif x < 0 and y > 0:
print ('x, y point lies in the Second quandrant')
elif x < 0 and y < 0:
print ('x, y point lies in the Third quandrant')
elif x > 0 and y < 0:
print ('x, y point lies in the Fourth quandrant')
elif x == 0 and y == 0:
print ('x, y point lies at the origin')
Solve Problems by Coding Solutions - A Complete solution for python programming
Reading files into Python
f = open("1.txt")
#create a text file which consists of names of students in class
# Printing file all the names
print("File contnet as in text file:",f.read())
f = open("1.txt")
# Printing file one by one letters
print("\nFile contnet one by one word fromtext file:")
next = f.read(1)
while next != "":
print(next)
next = f.read(1)
#create a text file which consists of names of students in class
# Printing file all the names
print("File contnet as in text file:",f.read())
f = open("1.txt")
# Printing file one by one letters
print("\nFile contnet one by one word fromtext file:")
next = f.read(1)
while next != "":
print(next)
next = f.read(1)
Subscribe to:
Posts (Atom)