
Tin 2

Quiz
•
Others
•
University
•
Medium
Đoàn Hoàng
Used 1+ times
FREE Resource
52 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào sau đây là đúng?
if (x > 0) { y = 10; } else if (x < 0) { y = -10; }
if (x > 0); y = 10; else if (x < 0) y = -10;
if (x > 0) { y = 10 } else if (x < 0) y = -10;
if (x > 0) { y = 10; else if (x < 0) { y = -10; } }
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào sau đây là đúng?
switch (x): { case 1: if (y > 0) z = 10; break; }
switch (x) case 1: if (y > 0) { z = 10; } break;
switch (x) { case 1: if (y > 0) { z = 10; } break; }
switch (x) { case 1: if y > 0 { z = 10; } break; }
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào sau đây là đúng với x=2 thì y=30?
switch (x) { case 1: y = 10; case 2: y = 20; break; case 3: y = 30; }
switch (x) { case 1: y = 10; case 2: y = 20; case 3; y = 30; break; }
switch (x) { case 1: y = 10; case 2: y = 20; case 3: y = 30; }
switch (x) { case 1: y = 10; break; case 2: y = 20; break; case 3: y = 30; }
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào gán y=10 khi x bằng 5 là đúng?
if x == 5 { y = 10; }
if (x == 5) { y = 10; }
if (x > 5) { y = 10; }
if (x != 5) y = 10;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào gán y = 0 khi x = 3?
switch (x) { case 1: y = 10; case 2: case 3: y=0; default: y = 30; }
switch (x) {case 1: case 2: case 3: y = 20; break; default: y = 0;}
switch (x) { case 1: case 2: y = 20; case 3: y=30; break; default: y = 0; }
switch (x) { case 1: y = 10; break; case 2: case 3: y=30; default: y = 0; }
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh if.. else sử dụng toán tử "hoặc logic" nào sau đây là đúng?
if (x > 0 || y > 0) { z = 10; } else { z = -10; }
if (x > 0 OR y > 0) z = 10 ; else z = -10;
if (x > 0) || (y > 0) { z = 10; } else { z = -10; }
if x > 0 || y > 0 { z = 10; } else z = -10;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào sau đây là đúng?
if x > 0 && y < 0 { z = 10; } else z = -10;
if (x > 0 && y < 0) z = 10 else z = -10
if (x > 0) && (y < 0) { z = 10; } else { z = -10; }
if (x > 0 && y < 0) { z = 10; } else { z = -10; }
Create a free account and access millions of resources
Similar Resources on Wayground
50 questions
English Language Quiz

Quiz
•
University
49 questions
Algorithmization and Programming Quiz

Quiz
•
University
48 questions
Language Learning Quiz

Quiz
•
University
50 questions
Геология 150-200

Quiz
•
University
56 questions
Mech 1340 Quiz 2 Review

Quiz
•
University
50 questions
A2L Refrigerant

Quiz
•
University
50 questions
dân số học đại cương

Quiz
•
University
54 questions
mô

Quiz
•
University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Others
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
34 questions
WH - Unit 2 Exam Review -B

Quiz
•
10th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
10 questions
Transition Words

Quiz
•
University
5 questions
Theme

Interactive video
•
4th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
10 questions
Spanish Greetings and Goodbyes!

Lesson
•
6th Grade - University