Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from modulepythong import *
- a=float(raw_input('Ingrese a: '))
- b=float(raw_input('Ingrese b: '))
- c=float(raw_input('Ingrese c: '))
- z1=float(raw_input('Ingrese z1: '))
- z2=float(raw_input('Ingrese z2: '))
- x=float (z1)
- plus=float(0.01)
- maxi=float(-99)
- mini=float(99)
- while x<=z2:
- y=((a*(x**2))+(b*x)+c)
- x+=plus
- if y > maxi :
- maxi=y
- #print maxi
- if y < mini :
- mini=y
- window_size(500, 500)
- window_coordinates(z1, mini, z2, maxi)
- x=z1
- while x <= z2 :
- y=((a*(x**2))+(b*x)+c)
- z=(a*((x+plus)**2)+(b*(x+plus))+c)
- create_line(x, y, x+plus, z, 'blue')
- x = x+plus
- print'Pulsa <Return> para salir: '
- raw_input()
Advertisement
Add Comment
Please, Sign In to add comment