下列變數名中不合法的是?(c)
a. abc
b. npc
c. 1name
d ab_cd
下列選項中不屬於關鍵字的是?(b)
a. and
b. print
c. true
d. in
下面哪個選項對應的**寫法是正確的?(c)
a.
b.('python'
('新手村'
)
c.('python'
('新手村'
)
d.('python'
('新手村'
)
下面選項中能列印出50的是?b('python'
'新手村'
)
a.
b.('100 - 50'
)
關於引號,下面選項中使用正確的是?d(100-50
)
a.
b.
('hello)
c.
("hello')
d.
(「hello」)
寫**在控制台列印("hello"
)
good good study, day day up!
寫**在控制台列印5次('good good study,day day up!'
)
you see see, one day day!
寫**列印數字 11、12、13、… 21for i in
range(0
,5):
(you see see,one day day!)
寫**列印數字 11,13,15,17,…99for i in
range(11
,22):
(i)
寫**列印數字:10、9、8、7、6、5for i in
range(11
,100,2
(i)
寫**計算:1+2+3+4+…+20 的和for i in
range(10
,4,-
1):print
(i)
寫**計算100以內所有偶數的和count =
0for i in
range(1
,21):
count+=i
(count)
寫**統計100~200中個位數是3的數的個數count =
0for i in
range(0
,100,2
):count+=i
(count)
寫**計算count =
0for i in
range
(103
,200,10
):count +=
1print
(count)
2*3*4*5*...*9
的結果
輸入乙個數,如果輸入的數是偶數就列印count =
1for i in
range(2
,10):
count*=i
(count)
偶數
否則列印奇數
統計1000以內能被3整除但是不能被5整除的數的個數。num =
int(
input
('請輸入乙個數字:'))
if num %2==
0:print
('偶數'
)else:
('奇數'
)
count =
0for i in
range(0
,1000,3
):if i %5!=
0:count+=
1print
(count)
第一周作業(零基礎)
下列變數名中不合法的是?c a.abc b.npc c.1name d ab cd 下列選項中不屬於關鍵字的是?b a.and b.print c.true d.in 下面哪個選項對應的 寫法是正確的?c a.print python print 新手村 b.print python print 新...
第一周作業(零基礎)
下列變數名中不合法的是?bc a.abc b.npc c.1name d ab cd 下列選項中不屬於關鍵字的是?b a.and b.print 輸出函式 c.true d.in 下面哪個選項對應的 寫法是正確的?c d a.print python print 新手村 前面不該空格b.print ...
第一周作業(零基礎)
下列變數名中不合法的是?c a.abc b.npc c.1name d ab cd 下列選項中不屬於關鍵字的是?b a.and b.print c.true d.in 下面哪個選項對應的 寫法是正確的?c a.print python print 新手村 b.print python print 新...