P4B Quiz (4):運算子、輸入、輸出及 import 簡介

by KC
0 comment

Welcome to your quiz -「 P4B Quiz (4):運算子、輸入、輸出及 import 簡介

Name
Email
1. 
假設變量 x 已被初始化為一個整數值(例如,x = 3)。 以下語句的作用是什麼?

x = x + 2

2. 
Python 會優先執行下面哪一個數學表達式的元素?

3. 
下面表達式的值是多少?

42 % 10

4. 
執行以下語句後 x 的值是多少?

x = 1 + 2 * 3 - 8 / 4

5. 
名為 name 的變數被賦予 “Testing” 的值。以下語句的輸出是什麼

print(len(name))

6. 
Python 中的函式(functions)是什麼?

7. 
Python 中的關鍵字(keywords)指的是什麼?

8. 
Python 中的 print 函式有什麼作用?

9. 
空格中應填寫何種正確的 Python 指令,使其能將“My first Python program” 訊息輸出至螢幕上。

___("My first Python program")

10. 
填寫下面空格答案,使得程式碼可以列印出 Yellow is the color of sunshine

color = ___
thing = "sunshine"
print(color + " is the color of " + thing)

error: Content is protected !!