NEW
Font size
S
M
L
XL
WorksheetsPrint() dan variable
Total questions: 10
Worksheet time: 8mins
Name
Class
Date
1.
Apa output dari kode berikut ini?
speed = 90
print("Robot speed is", speed)
a)
Robot speed is speed
b)
Robot speed is: 90
c)
Robot speed is 90
d)
90 is Robot speed
2.
Manakah yang benar untuk membuat variabel nama robot?
a)
robot name = "Atlas"
b)
robot-name = "Atlas"
c)
robot_name = "Atlas"
d)
robot_name == "Atlas"
3.
voltage = 13.2
print("Battery voltage:", voltage, "V")
Apa output-nya?
a)
Battery voltage: 13.2 V
b)
Battery voltage: voltage V
c)
13.2V
d)
Battery: 13.2
4.
Apa hasil dari kode berikut ini?
x = 4
y = 6
print("Sum is", x + y)
a)
Sum is x + y
b)
Sum is 10
c)
Sum is 46
d)
10
5.
name = "Bolt"
speed = 100
print("Name:", name, "Speed:", speed) `
Output-nya adalah...
a)
Name: Bolt Speed: 100
b)
Name: name Speed: speed
c)
Bolt and 100
d)
Name: Bolt, Speed: 100
6.
Apa hasil dari kode berikut?
arm_position = 45
print("Arm moved to", arm_position, "degrees")
a)
Arm moved to arm_position degrees
b)
Arm moved to: 45°
c)
Arm moved to 45 degrees
d)
Arm moved to degrees 45
7.
Apa yang salah dari kode ini?
print("Current mode:", mode)
a)
Variabel mode belum dibuat
b)
Tidak boleh pakai print()
c)
Kurang tanda tambah
d)
Penulisan string salah
8.
Apa output dari kode ini?
robot_name = "Zeus"
print("Hello" + robot_name)
a)
Hello + Zeus
b)
Hello robot_name
c)
HelloZeus
d)
Hello Zeus
9.
Apa hasil dari kode berikut?
print("Autonomous", "mode", "ready")
a)
Autonomousmode ready
b)
Autonomous mode ready
c)
Autonomous, mode, ready
d)
Error
10.
left = 70
right = 75
print("Left:", left, "| Right:", right) ```
a)
Left: left | Right: right
b)
Left: 70 | Right: 75
c)
Left - 70 | Right - 75
d)
70 and 75
Reset
