ª×èÍ
¡ÃسÒãÊè ....
ª×èÍ..àÅ¢·Õè...Ëéͧ
.. àªè¹
¸ÕÃÀÑ·Ã 58 Á.6.3
1.
â»Ãá¡ÃÁ ÀÒÉÒ python ¤Ô´¤é¹¤ÃÑé§ááâ´Â
a. python 侸͹
b.
Guido van Rossum
c.
James Gosling
d.Python Guido
2.
¡Òà RUN ã¹ÀÒÉÒ Python
a.
compile ¡è͹
b.
compile ¡è͹
áÅéÇ click
c. click ä¿Åì侸͹
d.
double click ÃÙ» ä¿Åì.py
3.
¢éÍã´â¤Ã§ÊÃéÒ§ ÀÒÉÒ python ·Õè¶Ù¡µéͧ
a.
#!/usr/python
{ } inputs "press"
b.
#!/usr/bin/python
..........
n=input
s
c.
#!/usr/bin/python
...........
n=input
s"press "
d.
#!/usr/bin/python
...........
n=input
("press")
4.
¢éÍã´·Õèãªé¤ÓÊÑè§ python ¶Ù¡µéͧ
a.
print "ans = " , p
b.print
("ans = ",p)
;
c.print
("ans = "+p)
;
d.
print " ans = <br> "+p
5.
ºÑ¹·Ö¡¢éÍÁÙÅã¹â»Ãá¡ÃÁ pp5 ·Õè note padä´é¶Ù¡µéͧ
a.
pp5.python
b. pp5.pyt
c.
"pp5.py"
d. pp5.py.txt
6.
¢éÍã´¡ÒÃãªé Python
¶Ù¡µéͧ
a
. Math.pow(2,3)
b.
2**3
c.
2 ^ 3
d.
pow(2,3)
7. ¤ÓÊÑè§ Python ãªéàÇ鹺Ã÷Ѵ
a. \n
b. <br>
c.
print"<br>"
d.
print "\n"
8. ¤ÓÊÑè§ for 1-10 ¢éÍã´¶Ù¡µéͧ
a.
for a in 1..11:
¤ÍÅÑÁÀì 1 àÊÁÍ
b. for a in range(1,11)
:
¤ÍÅÑÁÀì 1 àÊÁÍ
c.
for a in range(1,10)
:
¤ÍÅÑÁÀì 1 àÊÁÍ
d.
for a in 1..10
:
¤ÍÅÑÁÀì 1 àÊÁÍ
9. ¡Ó˹´¢éÍã´¶Ù¡µÒÁÀÒÉÒ python
a.
print" "+pow(2,5)
;
b.
print" ",pow(2,5)
;
c.
print" "+
Math.pow(2,5)
;
d.
print" ",2**5
10.¡Òà ÃÒ¡·Õè 3 ¢Í§ 8 ¶Ù¡µéͧ
a.
print" ",pow(8,1/3)
;
b.
print" ",8**(1/3)
c.
print" ",pow(8,0.3)
d.
print" ",8**0.3
11.Python ËÒ¤èÒ sin 60¨Ðä´é
a.
print" ",sin(60*Math::PI/180)
b.
print" ",Math.sin(60*Math.PI/180)
c.
print" ",math.sin(60*Math.PI/180)
d.
print" ",math.sin(60*math.pi/180)
12.
à¤Ã×èͧËÁÒ Python˹éÒ¤ÓÊÑè§ã´æ¨ÐäÁèáÊ´§¼Å
a.
$
b.
//
- -
c.
#
d. /*
13.
¤ÓÊÑè§ã´áÊ´§àÅ¢¤Õèã¹ Python
a.
if (a%2 = =1)
:
print" ", a
b. if (a mod 2 =1)
:
print " "+a
c. if (a mod 2 =1)
:
print " ",a
d.
if (a/2 = =0 )
:
print " ",a
14.¤ÓÊÑè§Ç¹«éÓ 10-1
a.
for a in range(10..0):
b.
10.downto 1 do |a|
:
c.
for a in range(10,0,-1):
d.
for a in 11..1
:
15.
¢éÍã´¶Ù¡ n= ¨Ó¹Ç¹àµçÁ¡Òûé͹
n
a.
n=input"n= "
b.
n=input("n= ")
c.
n=input
d.
n=gets
16. »é͹ÃÑÈÁշȹÔÂÁ¡çä´é
a.
r =
input("n= ")
b.
r =
input "n= "
c.
r =
input n
d.
r = gets
17. 2áÅÐ3 ËÒÃŧµÑÇáÅéÇáÊ´§¤èÒ a
¨º´éÇ end µÃ§ if
a.
if(a%2==0 && a/3==0)print" ",a
b.
if(a%2==0&&a%3==0)print" ",a
c.
if(a%2==0 and a%3==0)print" ",a
d.
if(a%2==0 or a%3==0)print" ",a
18.
ÀÒÉÒ Pythonãªé à¤Ã×èͧËÁÒÂÍÐäÃá·¹ ËÒÃàÍÒàÈÉ
a.
/
b.
#
c.
%
d.
mod
19.
Python áÊ´§¤èÒ a ÍÂÙèºÃ÷Ѵà´ÕÂǡѹ
a.
print" ",a
b.
print" "+a
c.
print" "+a,
d.
print" ",a,
20.
ËÒ¤èÒ
25+8*2
´éÇ Python侸͹ ÁÕ¤èÒ?
a.
66
b. 66.02
c. 41
d. 58
+ ¶éÒ·èÒ¹´Óà¹Ô¹ªÕÇÔµ´éǤÇÒÁ¾Í´Õ ·èÒ¹¨ÐäÁèà»ç¹Ë¹ÕéµÅÍ´¡ÒÅ+