
Python3
Authored by 趙怡梅 趙怡梅
Computers
9th Grade
9 Questions
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
if input()=1:
print(int('請問')+"1")
若輸入2
請問輸出為?
提示:注意變數型態
2
'請問1'
"1"
程式錯誤,無法輸出
Answer explanation
If後方應接布林值==而非=
字串'請問'也無法被轉為數字
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#print('c')
if not (1==1):
print('a')
else:
print('b')
print('d')
'''
print('e')
'''
請問輸出包含哪些字母?
提示:注意註解和if….else的用途
bd
acd
bcde
acde
Answer explanation
print('c'), print('e')皆被註解掉了,不會運行
而print('a')需要(1==1)不成立才行
所以也不可能運行
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
print(str(not(int('1')==1)))
請問輸出的資料類型為?
提示:逐次處理函數去括號
整數int
字串str
布林值bool
程式錯誤,無法輸出
Answer explanation
int('1')==1
>>>True
not(True)
>>>False
str(False)
>>>字串'False'
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
a=int(input()+input())+int(input())
b="1"+str(a)
print(b)
若分別輸入1,2,3
請問輸出為?
提示:字串相加會合併
16
115
7
1123
Answer explanation
input()+input()
'1'+'2'
>>>'12'
Int('12')+int('3')
>>>15
"1"+str(15)
>>>"115"
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
a=0
b=2
if a>b
print("a>b")
else:
print('a不小於b')
請問輸出為?
提示:注意細節
"a>b"
'a不小於b'
False
程式錯誤,無法輸出
Answer explanation
第三行的if缺少冒號
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
in1=int(input('輸入被除數'))
in2=int(input('輸入除數'))
print('商為:'+str(in1//in2))
print("餘數為_____n1%in2))
請問底線處的程式碼應為?
提示:注意括號、引號等需要成對的符號
//
用來求除完後的整數部分
例如7//2
>>>3
%
用來求除完後的餘數
例如11%9
>>>2
: ',str(i
: '+str(
:"+str(i
: '+int(i
Answer explanation
第四行的
"餘數為
必須要有雙引號結尾
+和,都是字串組合之功用,這裡可互換
Str是為了將數字修改為字串,故不可改成int
結尾的i是為了與n1合在一起稱為in1
否則n1為一個未定義的變數
故不可省略
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
a=1
b=3
c=a+b+1
print(a+b+c)
請問輸出為?
提示:逐次進行加法
7
8
9
10
Answer explanation
變數c為1+3+1
>>>5
輸出為1+3+5
>>>9
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
12 questions
資訊科技九年級~網路技術與服務
Quiz
•
9th Grade
12 questions
Data Representation - Keywords
Quiz
•
9th - 11th Grade
10 questions
Microsoft Excel #1 Basics
Quiz
•
7th - 10th Grade
10 questions
python quiz
Quiz
•
6th Grade - Professio...
13 questions
WJEC GCSE ICT Unit 1 E-Mail
Quiz
•
9th - 10th Grade
10 questions
Excel (9-րդ դասարան)
Quiz
•
9th Grade - University
12 questions
Project-Stem Unit 1 python coding
Quiz
•
9th - 12th Grade
10 questions
Creating Database Tables
Quiz
•
8th - 10th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade