darksantos

Ejercicio137

Jun 10th, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. from modulepythong import *
  4. from math import pi, cos
  5.  
  6. x1 = float(raw_input('Dime el lΔ±mite inferior del intervalo: '))
  7. x2 = float(raw_input('Dime el limite superior del intervalo: '))
  8. #puntos = int(raw_input(’Dime cuΒ΄antos puntos he de mostrar: ’))
  9.  
  10. window_size(500, 500)
  11. window_coordinates(x1, -1.5, x2, 1.5)
  12.  
  13. incremento = (x2 - x1) / 50
  14.  
  15. x = x1
  16. while x <= x2 - incremento:
  17.     create_line(x, cos(x), x+incremento, cos(x+incremento))
  18.     x += incremento
  19.  
  20. print'Pulsa <Return> para salir: '
  21. raw_input()
Advertisement
Add Comment
Please, Sign In to add comment