total=0
count=0
while count <5:
num=int(input("กรอกตัวเลข :"))
total = total+num
count = count+1
print("ผลรวม =",total)
print("ค่าเฉลี่ย = ",total/count)
point = float(input("โปรดป้อนคะแนน : "))
def grade(score):
if score>=80:
return'4'
elif score >=70: #else if
return'3'
else:
return'0'
if 0<= point <=100:
rank=grade(point)
print("คะแนนของคุณ คือ ",point)
print("เกรดของคุณ คือ ", rank)
else:
print("กรุณากรอกคะแนนให้ถูกต้อง")
import turtle
t=turtle.Turtle()
t.circle(100)
def yo(x,y):
t.penup()
t.goto(x,y)
t.pendown()
yo(20,30)
for i in range(4):
t.forward(100)
t.right(90)
yo(100,50)
for i in range(5):
t.forward(100)
t.right(144)
yo(200,50)
for i in range(5):
t.circle(40)
t.right(70)
turtle.done()