1) Why do we need conditional statements in coding? a) To enable computer to count a mathematic question b) To enable computer to make decision c) To enable debugging process d) To assign a solution to a problem 2) Choose the wrong statement. a) elif is added before if statement b) elif = else-if c) elif is compulsory in if-else statement d) elif is added before else statement 3) How do you write "if statement" ? a) if [color = "blue]; b) if(color == blue): c) if (color = "blue"); d) if (color == "blue"): 4) If all the conditions are not matched, a) if code block will be executed b) elif code block will be executed c) else code block will be executed d) no action will be executed 5) Find the correct match. a) == less than b) != not equal to c) >= greater than d) < equal to 6) To assign x to 20, we write... a) x >= 20 b) x == 20 c) x = 20 d) x != 20 7) For the code if (age >= 18): a) It will execute for aged 18 or above b) It will execute for aged 18 and below c) It will execute for age 18 only d) It will execute for all except aged 18 8) Which classification is wrong? a) else -> conditional operator b) elif -> conditional operator c) == -> comparison operator d) not -> comparison operator 9) Choose the correct explaination a) and -> both true = true b) not -> wrong remains wrong c) or -> one correct, one wrong = wrong d) and -> both wrong = correct 10) if (weather == "sunny" and temp == 28): a) If temperature is 28 degree Celcius , the weather is rainy b) The weather is hot if temperature is 28 degree Celcius c) Weather is sunny if temperature is 28 degree Celcius d) Either temperature is 28 degree Celcius or weather is sunny 11) randomNumber = random.randint(0,9) a) 10 is accepted result b) The value is called randomNumber c) Generate a random number between 0-9 d) The result is not stored to a variable 12) Which situation uses an "if-else" statement a) traffic light colour b) win/lose situation c) weather condition d) type of transport used
0%
Coding Quiz (8) - Conditional Statements
שתף
שתף
שתף
על ידי
Guanjie0807
10-12 years old
עריכת תוכן
הדפסה
הטבעה
עוד
הקצאות
לוח תוצאות מובילות
הצג עוד
הצג פחות
לוח התוצאות הזה הוא כרגע פרטי. לחץ
שתף
כדי להפוך אותו לציבורי.
לוח תוצאות זה הפך ללא זמין על-ידי בעל המשאב.
לוח תוצאות זה אינו זמין מכיוון שהאפשרויות שלך שונות מאשר של בעל המשאב.
אפשרויות חזרה
חידון טלויזיה
היא תבנית פתוחה. זה לא יוצר ציונים עבור לוח התוצאות.
נדרשת כניסה
סגנון חזותי
גופנים
נדרש מנוי
אפשרויות
החלף תבנית
הצג הכל
תבניות נוספות יופיעו במהלך המשחק.
תוצאות פתוחות
העתק קישור
קוד QR
מחיקה
האם לשחזר את הנתונים שנשמרו באופן אוטומטי:
?