1) What is Python? a) A kind of snake b) A video game c) A programming language d) A robot 2) What is an algorithm? a) A secret code b) A sequence of actions to solve a task c) A drawing d) A computer virus 3) What does a program do? a) Makes music b) Draws shapes c) Runs an algorithm written in a programming language d) Builds houses 4) What does print("Hello") do in Python? a) Sends an email b) Prints paper c) Writes “Hello” on the screen d) Draws a picture 5) print(2 + 3 * 4) a) 20 b) 14 c) 24 d) 10 6) print((2 + 3 )* 4) a) 20 b) 14 c) 24 d) 10 7) What is a variable? a) It like an storage box in Python b) A secret number c) A game d) A password 8) Which is a good variable name? a) a b) number_of_students c) 3price d) print 9) What does the input() function do? a) Prints a message b) Gets information from the keyboard c) Calculates math d) Sends an SMS 10) Which functions are used to switch from one data type to another? a) input() b) str() functions are used to switch from one data type to another. c) int() d) print() 11) What is the output of this code? a) 105 b) 500 c) 100 d) 5 12) What does int("42") do? a) Turns the number into a string b) Makes a letter c) Turns the text(string) "42" into the number 42. d) Deletes the number 13) What is the output ? a) 1518 b) 43 c) 33 d) 11111 14) What is the output ? a) 10 b) 54 c) 9 d) 11 15) What is the correct way to convert user input to a number? a) str(input()) b) input() c) int(input()) d) float('input') 16) What happens if you try int('hello') in Python? a) A. It returns 0 b) B. It returns 'hello' c) C. It prints hello d) D. It gives an error 17) 3. What type of value does input() always return? a) 3. What type of value does input() always return? b) A. Integer c) B. Float d) C. String 18) print('12' + '34') a) What is the result of: print('12' + '34')? b) A. 46 c) B. 1234 d) C. 12 + 34 19) What is the result of: print(12 + int('34'))? a) A. 46 b) B. 1234 c) C. Error d) D. 12 + 34 20) Mark the programs without errors. a) b) c) both of them False 21) Choose the actions that this program performs. a) The program works with variables b) The program uses functions to input and output data c) The program prints calculation results d) The program prints text prompts for the user
0%
Introduction to Python Programming
共用
共用
共用
由
Hejaclk
編輯內容
列印
嵌入
更多
作業
排行榜
顯示更多
顯示更少
此排行榜當前是私有的。單擊
共用
使其公開。
資源擁有者已禁用此排行榜。
此排行榜被禁用,因為您的選項與資源擁有者不同。
還原選項
測驗
是一個開放式範本。它不會為排行榜生成分數。
需要登錄
視覺風格
字體
需要訂閱
選項
切換範本
顯示所有
播放活動時將顯示更多格式。
打開結果
複製連結
QR 代碼
刪除
恢復自動保存:
?