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コード
削除
自動保存:
を復元しますか?