1) What is the meaning of variable? a) Labelled data in a storage box b) Labelled storage box used to store data c) Storage box that can edit or insert data d) Storage box used to store labelled data 2) Which of the following is the correct way to declare a Python variable ? a) greeting == Hello World! b) greeting == "Hello World"; c) greeting = Hello World! : d) greeting = "Hello World!" 3) Which one is used to display the value stored in a variable ? a) cout >>> b) print() c) output() d) data.out() 4) Find the meaning for "assigning a value" ... a) store a value to a variable b) change a value to another value c) find error in a value d) modify the value with more suitable one 5) Which of the following is not the naming conventions (rules) in Python ? a) Some Python keywords cannot be used b) Spaces are not allowed in variable names c) Variable names can only contain characters, numbers and underscores d) Variables names must start with a number 6) Choose the correct variable name. a) ?sweet5 b) ban@na c) bank_account d) 123message 7) Choose the correct statement about comment. a) The first letter must be capitalised b) Comments are made by adding hash (#) in front of the line c) No space is allowed in comment d) Only one comment is available for each code 8) Choose the correct syntax for input. a) lastName = "input()" b) firstName == "input()" c) lastName == input d) firstName = input() 9) Where is prompt (message) added to an input? a) Inside the bracket b) Before the variable name c) Between variable name and equal sign d) After the bracket 10) How do we call the window that displays the output? a) indentation b) Python window c) output page d) console 11) What is a string in programming ? a) A sequence of characters in between a pair of quotation marks b) A block of pre-written code that performs a specific task c) A positive or negative whole number without decimal point d) A number that has a decimal 12) If we want to key in "2.5", we will use... a) string b) integer c) float d) boolean 13) Choose the wrong pair. a) b = 'False' [String] b) c = True [Boolean] c) a = 10.3 [integer] d) x = "5.8" [String] 14) What is capitalize() ? a) Remove whitespace from a string b) To make the first letter of a string to be capital letter c) To convert all the letters into capital letter d) Convert a string to a title case 15) Which one is used to convert one data type to another? a) ageStr = str(age) b) int(x) c) upper() d) count() 16) What is the meaning of operator? a) Special symbols used on variables and values b) Normal symbols used on values c) Variables used on values d) Values in a set of variables 17) Choose the wrong answer. a) + Addition b) * Multiplication c) % Modulus d) // Division 18) Which one shows "4 power of 3" ? a) 4 % 3 b) 4 // 3 c) 4 * 3 d) 4 ** 3 19) Which one helps us to get the remainder for 11 divides 2 ? a) 11 % 2 b) 11 - 2 c) 11 * 2 d) 11 // 2 20) We use assignment operators to ... a) modify values in a variable b) assign variables to a value c) assign values to a variable d) modify variables in a value
0%
Coding Quiz (7) - Python Fundamentals
共享
共享
共享
由
Guanjie0807
10-12 years old
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
问答游戏
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?