Monday, February 23, 2015

Pythagoras Game

graphsize 600,400
color black
rect 0,0,600,400
color white
x1=int(rand*600)
y1=int(rand*400)
circle x1,y1,3
x2=int(rand*600)
y2=int(rand*400)
circle x2,y2,3
# Vertical and Horizontal distance
h=x1-x2
v=y1-y2
# Pythagoras formula
dist=sqrt(v^2+h^2)
Print "The black rectangle is 600 by 400"
input "What is the distance between the points",a
font "arial" ,30,30

text 150,200,"Distance="+int(dist)

2 comments:

  1. Free download games Many of the websites you will locate will pay for witty pictures, videos, and games. The ones they have are flash based, even though they all have a every second perspective as regards them, and there are even some made specifically for adults. So if you'on looking for a free download games for children, make determined you locate a website that offers kid enjoyable entertainment or you may be exposing your kids to adult material without realising it. The easiest mannerism to find a specific type of game is to Google it and thousands of oscillate results will appear showing you the most popular pardon ones just just about the internet right now. http://www.madplayer.net

    ReplyDelete