음성고등학교 로고이미지

RSS 페이스북 공유하기 트위터 공유하기 카카오톡 공유하기 카카오스토리 공유하기 네이버밴드 공유하기 프린트하기
2505 김준호 작품 보고서
작성자 학생과제 등록일 19.12.26 조회수 94
첨부파일
함수.zip (393B) (다운횟수:26)
3차 함수 그래프.zip (458B) (다운횟수:24)
2차 함수 그래프.zip (446B) (다운횟수:24)

 1차 함수 그래프   

import turtle as t

 

def  line(x1, y1, x2, y2):

    t.up()

    t.goto(x1, y1)

    t.down()

  

  t.goto(x2,y2)

 

    return

 

t.setworldcoordinates(-50, -1000, 50, 1000)

t.speed(0)

t.hideturtle()

 

line(0, -1000, 0, 1000)

line(-50, 0, 50, 0)

 

t.color("green")

t.up()

x=-50

y=50*x-200

t.goto(x,y)

t.down()

for x in range(-50,51):

    y=50*x-200

    t.goto(x,y)

 

 

2차 함수 그래프 

import turtle as t

 

def  line(x1, y1, x2, y2):

    t.up()

    t.goto(x1, y1)

    t.down()

    t.goto(x2,y2)

 

    return

 

t.setworldcoordinates(-50, -1000, 50, 1000)

t.speed(0)

t.hideturtle()

 

line(0, -1000, 0, 1000)

line(-50, 0, 50, 0)

 

t.color("red")

t.up()

x=-50

y=x**2-2*x-500

t.goto(x,y)

 

t.down()

for x in range(-50,51):

    y=x**2-2*x-500

    t.goto(x,y)

 

 

3차 함수 그래프

import turtle as t

 

def  line(x1, y1, x2, y2):

    t.up()

    t.goto(x1, y1)

    t.down()

    t.goto(x2,y2)

 

    return

 

t.setworldcoordinates(-50, -1000, 50, 1000)

t.speed(0)

t.hideturtle()

 

line(0, -1000, 0, 1000)

line(-50, 0, 50, 0)

 

t.color("blue")

t.up()

x=-100

y=x**3+5**2-100*x-500

t.goto(x,y)

 

t.down()

for x in range(-100,101):

    y=x**3+5**2-100*x-500

    t.goto(x,y)

    

이전글 20425이현규
다음글 2507 라용대 작품 제출