Docsity

Extron Certified Programmer Practice Exam, Exams of Technology

Toggle sidebar
bg1
Extron Certified Programmer Practice
Exam
**Question 1. Which Python data type is immutable?**
A) list
B) dictionary
C) tuple
D) set
Answer: C
Explanation: Tuples cannot be altered after creation, making them immutable, while lists,
dictionaries, and sets are mutable.
**Question 2. In ControlScript, which method is used to send a serial command to an Extron
device?**
A) send_command()
B) write()
C) transmit()
D) serial_send()
Answer: B
Explanation: The write() method of a serial port object sends raw data to the connected device.
**Question 3. What keyword is used to define a function in Python?**
A) def
B) function
C) func
D) define
Answer: A
Explanation: The def keyword introduces a new function definition.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57

Partial preview of the text

Download Extron Certified Programmer Practice Exam and more Exams Technology in PDF only on Docsity!

Exam

Question 1. Which Python data type is immutable? A) list B) dictionary C) tuple D) set Answer: C Explanation: Tuples cannot be altered after creation, making them immutable, while lists, dictionaries, and sets are mutable. Question 2. In ControlScript, which method is used to send a serial command to an Extron device? A) send_command() B) write() C) transmit() D) serial_send() Answer: B Explanation: The write() method of a serial port object sends raw data to the connected device. Question 3. What keyword is used to define a function in Python? A) def B) function C) func D) define Answer: A Explanation: The def keyword introduces a new function definition.

Exam

Question 4. Which of the following operators checks for equality? A) = B) == C) != D) <> Answer: B Explanation: The double equals (==) compares two values for equality. Question 5. In OOP, what is the term for a class that inherits attributes from another class? A) Base class B) Parent class C) Subclass D) Interface Answer: C Explanation: A subclass derives attributes and methods from its parent (base) class. Question 6. Which ControlScript object represents the main program entry point? A) System B) Program C) Core D) Engine Answer: B Explanation: The Program object is the top‑level container that runs when the processor starts.

Exam

Question 10. In a for‑loop, which keyword exits the loop prematurely? A) stop B) exit C) break D) quit Answer: C Explanation: break terminates the nearest enclosing loop immediately. Question 11. Which ControlScript method registers a callback for a button press on a TouchLink panel? A) button.on_press() B) button.add_event() C) button.set_handler() D) button.register_callback() Answer: B Explanation: add_event() attaches a function to be called when the button generates an event. Question 12. What is the purpose of the try…except block in ControlScript? A) To repeat code until success B) To handle runtime errors without crashing the program C) To speed up execution D) To define a new class Answer: B Explanation: try…except catches exceptions, allowing graceful error handling.

Exam

Question 13. Which of the following is a logical operator in Python? A) & B) && C) and D) ++ Answer: C Explanation: The keyword and performs logical conjunction; & is a bitwise operator. Question 14. How do you write a line of text to a file named “config.txt” in ControlScript? A) file = open("config.txt","w"); file.write_line("data") B) with open("config.txt","w") as f: f.write("data\n") C) write_file("config.txt","data") D) file = open("config.txt","r"); file.write("data") Answer: B Explanation: Using a with‑statement ensures proper closure; write() adds the string. Question 15. Which device type uses the eBUS protocol? A) IR remote B) TouchLink panel C) eBUS button panel D) Ethernet switch Answer: C Explanation: eBUS is a proprietary serial bus for Extron button panels and peripherals.

Exam

Question 19. Which method retrieves the current value of a digital input port? A) read() B) get_state() C) is_high() D) value() Answer: B Explanation: get_state() returns True/False reflecting the voltage level of the digital input. Question 20. In a ControlScript program, where is the main execution loop typically located? A) Inside the init method of Program B) In a while True: block at the end of the script C) In the run() method of the Program object D) ControlScript runs event‑driven; there is no explicit infinite loop. Answer: D Explanation: ControlScript is event‑driven; the processor’s runtime engine handles the loop. Question 21. Which Python statement creates a list containing the numbers 1 through 5? A) numbers = (1,2,3,4,5) B) numbers = [1,2,3,4,5] C) numbers = {1,2,3,4,5} D) numbers = <1,2,3,4,5> Answer: B Explanation: Square brackets denote a list.

Exam

Question 22. What does the “self” parameter represent in a class method? A) The class itself B) The instance of the class on which the method is called C) A global variable D) An external library object Answer: B Explanation: self is a reference to the current object instance. Question 23. Which of the following is the correct syntax to import only the sleep function from the time module? A) import time.sleep B) from time import sleep C) import sleep from time D) include time.sleep Answer: B Explanation: from … import … brings a specific name into the local namespace. Question 24. In Extron’s IP Link Pro processor, which port type is used for IR control? A) COM B) IR C) RELAY D) DIGITAL Answer: B Explanation: The IR ports are dedicated to infrared transmission.

Exam

Explanation: The Timer class can be configured with a timeout and callback. Question 28. How do you enable logging of debug messages in a ControlScript program? A) set_debug(True) B) import logging; logging.basicConfig(level=logging.DEBUG) C) enable_logging() D) debug_mode = 1 Answer: B Explanation: Using Python’s logging module with level DEBUG captures detailed output. Question 29. Which of the following is a valid way to concatenate two strings “Hello” and “World” in Python? A) “Hello” + “World” B) “Hello”.concat(“World”) C) “Hello” – “World” D) join(“Hello”,“World”) Answer: A Explanation: The + operator joins strings. Question 30. In a ControlScript device driver, what method typically processes incoming serial data? A) on_receive() B) data_handler() C) process_input() D) read_callback()

Exam

Answer: A Explanation: on_receive() is called when new serial bytes arrive. Question 31. Which operator is used for integer (floor) division in Python? A) / B) // C) % D) * Answer: B Explanation: // performs division and discards the remainder. Question 32. What is the effect of the statement “global count” inside a function? A) Declares count as a constant B) Allows the function to modify the module‑level variable count C) Creates a new global variable named count D) Imports count from another module Answer: B Explanation: The global keyword tells Python to use the variable defined at the module scope. Question 33. Which ControlScript object represents a physical relay output? A) RelayPort B) DigitalOut C) Relay D) OutputRelay Answer: C

Exam

Explanation: The hash symbol starts a comment line. Question 37. Which method in ControlScript is used to update a variable that is bound to a TouchLink UI element? A) set() B) update() C) write() D) set_value() Answer: A Explanation: set() changes the value of a bound variable, causing UI feedback to update. Question 38. What does the “elif” keyword stand for? A) Else if – additional conditional branch B) Else – end if C) End loop – continue D) Error handling – log Answer: A Explanation: elif provides another conditional check after an if. Question 39. In a ControlScript program, which object would you use to monitor the power status of an Extron matrix switcher? A) PowerMonitor B) DeviceStatus C) StatusFeedback D) None – you poll the device via its API methods.

Exam

Answer: D Explanation: Status is typically obtained by sending a query command and parsing the response. Question 40. Which Python built‑in function returns the length of a list? A) size() B) count() C) len() D) length() Answer: C Explanation: len() works for sequences, including lists. Question 41. Which ControlScript class is used to handle eBUS button panel events? A) eBUSButton B) ButtonPanel C) eBUSDevice D) eBUSPort Answer: C Explanation: eBUSDevice represents an eBUS-connected peripheral and processes its events. Question 42. What is the default file mode when opening a file with open("data.txt")? A) write B) read C) append D) binary Answer: B

Exam

Explanation: The int() constructor parses a numeric string. Question 46. Which ControlScript function is used to delay execution for a specified number of milliseconds? A) sleep_ms() B) wait() C) delay() D) time.sleep() (with seconds) – there is no built‑in millisecond delay function. Answer: D Explanation: time.sleep() accepts seconds; for milliseconds you multiply by 0.001. Question 47. Which of the following is a correct way to define a class named ZoneController in Python? A) class ZoneController: B) def ZoneController(): C) class ZoneController[]: D) struct ZoneController: Answer: A Explanation: class keyword introduces a new class definition. Question 48. In a ControlScript program, what is the purpose of the “bind” method on a variable? A) To attach the variable to a hardware input B) To associate the variable with a UI element for automatic feedback C) To lock the variable from changes D) To encrypt the variable’s value

Exam

Answer: B Explanation: bind() links a program variable to a GUI control. Question 49. Which logical expression evaluates to True when both sensor_a and sensor_b are active? A) sensor_a or sensor_b B) sensor_a && sensor_b C) sensor_a and sensor_b D) sensor_a & sensor_b Answer: C Explanation: “and” returns True only if both operands are True. Question 50. What is the result of the expression 5 ** 2 in Python? A) 7 B) 10 C) 25 D) 52 Answer: C Explanation: ** is the exponentiation operator; 5 squared equals 25. Question 51. Which ControlScript method would you use to send an IR command string “POWER_ON” to an IR port? A) ir_send("POWER_ON") B) transmit_ir("POWER_ON") C) send("POWER_ON")

Exam

C) To manage network switches D) To run the ControlScript interpreter directly inside VS Code Answer: A Explanation: The extension enhances editing and deployment workflows. Question 55. Which of the following statements correctly creates a tuple with a single element “audio”? A) ("audio") B) ("audio",) C) ["audio"] D) {"audio"} Answer: B Explanation: A trailing comma distinguishes a single‑item tuple. Question 56. In Extron’s IP Link Pro, which port type can be configured for both digital input and output? A) COM B) RELAY C) DIGITAL D) IR Answer: C Explanation: Digital ports are bidirectional and can be set as input or output. Question 57. Which Python keyword is used to create an anonymous (lambda) function? A) anon

Exam

B) lambda C) def D) func Answer: B Explanation: lambda introduces a small, unnamed function. Question 58. What is the effect of calling the method clear() on a list variable? A) Deletes the list variable itself B) Removes all elements, leaving an empty list C) Sets each element to None D) Resets the list to its default values Answer: B Explanation: clear() empties the list but retains the list object. Question 59. Which ControlScript event type is triggered when a TouchLink panel is powered on? A) on_power B) system_start C) panel_ready D) None – there is no specific event; you check the program’s init routine. Answer: D Explanation: ControlScript programs start after the panel boots; there is no dedicated power‑on event. Question 60. Which of the following statements correctly checks if variable “mode” is not equal to “auto”?