Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

tkinter sin

from tkinter import *
import math

master = Tk()

w = Canvas(master, width=200, height=100)
w.pack()


x = 0
width = 200

for x in range(0, width):
    y = int(50 + 50*math.sin(4*((float(x)/width)*(2*math.pi) )))
    w.create_rectangle(1, 1, 1, 10, fill="yellow")
mainloop()
Comment

PREVIOUS NEXT
Code Example
Python :: django form is onvalid 
Python :: find no of iterations in python 
Python :: check if entry is NaT] 
Python :: nibabel expand dimension 
Python :: How to multiply a text in python 
Python :: Ranking in Pyspark 
Python :: reload module 
Python :: how to get max id in mongodb python 
Python :: saving data in python 
Python :: hewwo world 
Python :: perceptron multicouche scratch python 
Python :: python crear variables 
Python :: python assertRaises with class property 
Python :: pandas dexcribe only one column 
Python :: get localapplication python 
Python :: Python Record live streams (TS FILES) 
Python :: python to pseudo code converter 
Python :: python unsigned to signed integer 
Python :: df add column from dict 
Python :: convert pine script to python online 
Python :: remove nan from list 
Python :: scikit decision tree regressor 
Python :: python parse xml string 
Python :: bounding box in matplotlib 
Python :: pyplot.plot 
Python :: how to add virtual environment in vscode 
Python :: python fme logger 
Python :: where python packages are installed 
Python :: hash password python 
Python :: average python 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =