Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Wednesday, June 20, 2007

Python Programming Homework 1

อาจารย์ให้เมื่อวันที่ 19/6/50

even.py

# even.py
#
# A function that used to test if a number is even or not
#
# Written by Prem Sichanugrist (48050892)
#

def even(number) :
return (number % 2 == 0)



hypotenuse.py
# hypotenuse.py
#
# A function that will calculate a length of hypotenuse
# side of a right triangle given both other sides.
#
# Written by Prem Sichanugrist (48050892)
#

import math

def hypotenuse(side1, side2) :
return math.sqrt(float(side1) ** 2 + float(side2) ** 2)



การบ้านเสดแล้ว เย้!

Tuesday, November 28, 2006

อ่าน Python จบแล้ว

อ่าน Python จบแล้ว
หนังสือของสำนักพิมพ์ สสท. ที่ซื้อมา ..

อ่านไป ข้ามไปเยอะเหมือนกัน
เอาให้รู้ concept ละกัน
เพราะยังไง .. เดี๋ยวปีหน้าต้องใช้
แล้วก้อ .. เก็บไว้เป็น reference ได้อยู่และ .. .

อยากเขียน GetCode+ เป็น multi-thread โดยใช้ Python ละ
ท่าทางจะเจ๋งดี เพราะว่า connect เข้า server ได้หลายๆ ตัวพร้อมกัน
และดูเหมือนว่ามันจะเร็วกว่าการรัน PHP script บน apache
ที่แบบ .. ให้ user trigger อยู่ทุกวันๆ ..


ชักร้อนวิชา อ๊ากกกกก ><"" '