- Học kỳ
- SP2026
- Thời Gian
- 9/5/26
- Loại tài liệu
- FE
PRP201c SP26 FE
Dưới đây là toàn bộ các câu hỏi trắc nghiệm từ file tài liệu của bạn, được sắp xếp theo thứ tự câu hỏi tăng dần và giữ nguyên yêu cầu về số lượng đáp án lựa chọn:
Danh sách câu hỏi trắc nghiệm PRP201c_SP26_FE
Question 1
(Choose 1 answer)
Which of the following commands would update a column named "name" in a table named "Users"?
Question 2
- A. Users name 'new name' WHERE
- B. Users name new name WHERE
- C. UPDATE Users SET name='new name' WHERE
- D. UPDATE Users (name) VALUES ('new name') WHERE
(Choose 1 answer)
Which statement is used to stop a loop?
Question 3
- A. exit
- B. break
- C. stop
- D. return
(Choose 1 answer)
What is the value of the following expression? 42 % 10
Question 4
- A. 4
- B. 2
- C. 42
- D. 0.42
(Choose 1 answer)
What is the output of print("X\nY")?
Question 5
- A. XnY
- B. XY
- C. X newline Y
- D. Error
(Choose 1 answer)
How would you use string slicing [] to print out 'uct' from the following string?
x = From [email protected]
Question 6
- A. print(x(14/17])
- B. print(x[14:17])
- C. print(x[14:31])
- D. print(x[14+3])
(Choose 1 answer)
In the following XML, which node is the parent node of node e?
XML
<span><<span>a</span>></span><br> <span><<span>b</span>></span>X<span></<span>b</span>></span><br> <span><<span>c</span>></span><br> <span><<span>d</span>></span>Y<span></<span>d</span>></span><br> <span><<span>e</span>></span>Z<span></<span>e</span>></span><br> <span></<span>c</span>></span><br><span></<span>a</span>></span><br>
Question 7
- A. b
- B. a
- C. c
- D. e
(Choose 1 answer)
Which Python code is used to capture username from a Cisco Router through a prompt in Python 3?
Question 8
- A. tn.read_until(b"Login")
- B. tn.read_until(b"user")
- C. tn.read_until(b"user")
- D. tn.read_until(b"Username: ")
(Choose 1 answer)
Which method can be used to return a string in upper case letters?
Question 9
- A. upper()
- B. uppercase()
- C. toUpperCase()
- D. upperCase()
(Choose 1 answer)
What is the default sorting mode of the ORDER BY clause?
Question 10
- A. Ascending
- B. Descending
- C. SORT
- D. ORDER
(Choose 1 answer)
Assume x and y are assigned as follows: x = 5, y = -5. What is the effect of this statement: (x, y) = (y, x)?
Question 11
- A. The values of x and y are unchanged
- B. Both x and y are -5
- C. Both x and y are 5
- D. The values of x and y are swapped
(Choose 1 answer)
How do you read a file line by line?
Question 12
- A. file.read()
- B. for line in file:
- C. file.write()
- D. file.line()
(Choose 1 answer)
What would the following code print if the word is "brontosaurus"?
word="brontosaurus" d=dict() for c in word: d[c] = d.get(c, 0) + 1 print(d)
Question 13
- A. (b: 1, r: 2, o: 2, n: 1, t: 1, s: 2, a: 1, u: 2)
- B. {'b': 1, 'r': 2, 'o': 2, 'n': 1, 't': 1, 's': 2, 'a': 1, 'u': 2}
- C. {'b': 1, 'r': 2, 'o': 2, 'n': 1, 't': 1, 's': 2, 'a': 1, 'u': 2} (Dạng dictionary)
- D. (b: 1, r: 1, o: 1, n: 1, t: 1, s: 1, a: 1, u: 1)
(Choose 1 answer)
Which of the following is the database software used in this class?
Question 14
- A. Postgres
- B. Oracle
- C. SQL Server
- D. SQLite
- E. MySQL
(Choose 1 answer)
Which function can be used on the file to display a dialog for saving a file?
Question 15
- A. Filename.savefilename()
- B. Filename.asksavefilename()
- C. Filename.asksaveasfilename()
- D. No such option in python
(Choose 1 answer)
What is the most common Unicode encoding when moving data between systems?
Question 16
- A. UTF-128
- B. UTF-8
- C. UTF-32
- D. UTF-64
(Choose 1 answer)
Which is the correct command for a statement that will select data from the Breed column in the Cats table?
Question 17
- A. SELECT FROM Breed, Cats
- B. SELECT Cats FROM Breed
- C. FROM Cats SELECT Breed
- D. SELECT Breed FROM Cats
(Choose 1 answer)
What do we do to a Python statement that is immediately after an if statement to indicate that the statement is to be executed only when the if statement is true?
Question 18
- A. Underline all of the conditional code
- B. Indent the line below the if statement
- C. Start the statement with a "#" character
- D. Begin the statement with a curly brace
(Choose 1 answer)
What is the proper way to say "good-bye" to Python?
Question 19
- A. quit()
- B. stop()
- C. exit()
- D. end()
(Choose 1 answer)
Which of these collections defines a LIST?
Question 20
- A. ("apple", "banana", "cherry")
- B. {"name": "apple", "color": "green"}
- C. ["apple", "banana", "cherry"]
- D. ("apple", "banana", "cherry")
(Choose 1 answer)
What does the following Python code print out?
a=[1,2,3,8]
b=[4,5,6]
c=a+b
print(c)
Question 21
- A. 28
- B. [1, 2, 3, 8, 4, 5, 6]
- C. It raises an exception
- D. 7
(Choose 1 answer)
When reading data across the network (ie from a URL) in Python 3, what method must be used to convert it to the internal format used by strings?
Question 22
- A. find()
- B. encode()
- C. decode()
- D. upper()
(Choose 1 answer)
What is the output of print(list) if list = ['abcd', 786, 2.23, 'john', 70.2]?
Question 23
- A. ['abcd', 786, 2.23, 'john', 70.2]
- B. list
- C. Error
- D. None of the others
(Choose 1 answer)
How can you delete all of the rows where the "name" is "Ruby" in the Cats Table?
Question 24
- A. DELETE FROM Cats WHERE name = "Ruby"
- B. DELETE name='Ruby' FROM Cats
- C. DELETE ROW name = 'Ruby' FROM Cats
- D. DELETE FROM Cats WHERE name == "Ruby"
(Choose 1 answer)
Which HTTP header tells the browser the kind of document that is being returned?
Question 25
- A. Document-Type
- B. Content-Type
- C. Metadata
- D. ETag
- E. HTML-Document
(Choose 1 answer)
What is the correct way to create a function in Python?
Question 26
- A. create myFunction():
- B. def myFunction():
- C. function myFunction():
- D. def function myFunction()
(Choose 1 answer)
What is true about the following code segment?
if x == 5:
print('Is 5')
print('Is Still 5')
print('Third 5')
Question 27
- A. Depending on the value of x, either all three of the print statements will execute or none of the statements will execute
- B. The string 'Is 5' will always print out regardless of the value for x.
- C. The string 'Is 5' will never print out regardless of the value for x.
- D. Only two of the three print statements will print out if the value of x is less than zero.
(Choose 1 answer)
What is the default port number for HTTP?
Question 28
- A. 80
- B. 25
- C. 110
- D. 443
(Choose 1 answer)
What is the file extension of Python executable on Windows?
Question 29
- A. .bin
- B. .p3
- C. .dll
- D. .exe
(Choose 1 answer)
Which collection is ordered, changeable, and allows duplicate members?
Question 30
- A. SET
- B. TUPLE
- C. LIST
- D. DICTIONARY
(Choose 1 answer)
What is the correct way to prevent deletion of linked data across tables?
Question 31
- A. Use constraints
- B. Avoid using JOIN
- C. Use SELECT instead of DELETE
- D. Run rollback
(Choose 1 answer)
In the following code (numbers added) - which will be the last line to execute successfully?
(1) astr = 'Hello Bob'
(2) istr = int(astr)
(3) print('First', istr)
(4) astr = '123'
(5) istr = int(astr)
(6) print('Second', istr)
Question 32
- A. 2
- B. 1
- C. 6
- D. 3
(Choose 1 answer)
What should you check before scraping a web site?
Question 33
- A. That the web site supports the HTTP GET command
- B. That the web site allows scraping
- C. That the web site returns HTML for all pages
- D. That the web site only has links
(Choose 1 answer)
Which SQL command is used to insert a new row into a table?
Question 34
- A. INSERT INTO
- B. INSERT ROW
- C. ADD ROW
- D. INSERT TABLE
(Choose 1 answer)
Which of the following is NOT a valid comparison operator in Python?
Question 35
- A. ==
- B. !=
- C. <>
- D. >=
(Choose 1 answer)
Which of these collections defines a TUPLE?
Question 36
- A. {"apple", "banana", "cherry"}
- B. {"name": "apple", "color": "green"}
- C. ["apple", "banana", "cherry"]
- D. ("apple", "banana", "cherry")
(Choose 1 answer)
When you have multiple lines in an if block, how do you indicate the end of the if block?
Question 37
- A. You omit the semicolon on the last line of the if block
- B. You de-indent the next line past the if block to the same level of indent as the original if statement
- C. You put the colon character on a line by itself to indicate we are done with the if block
- D. You use a curly brace after the last line of the if block
(Choose 1 answer)
What is the ASCII character that is associated with the decimal value 42?
Question 38
- A. *
- B. +
- C. -
- D. /
(Choose 1 answer)
What is the result of the following statement: list((b'abcde' + b'fghi')[3:6])?
Question 39
- A. [b'd', b'e', b'f']
- B. b'def'
- C. [100, 101, 102]
- D. It raises an exception
(Choose 1 answer)
Which function from urllib retrieves the contents of a URL?
Question 40
- A. urlopen()
- B. connect()
- C. request()
- D. readurl()
(Choose 1 answer)
Why should humans learn the language of computers (programming)?
Question 41
- A. So they can repair hardware
- B. To help computers do boring tasks efficiently
- C. To replace all manual work
- D. To teach computers how to feel emotions
(Choose 1 answer)
In the example (0, 1, 2) < (0, 3, 4), why does Python return True?
Question 42
- A. Python compares the second element and finds 1 < 3
- B. Python compares the third element and finds 2 < 4
- C. Python compares the first element and finds 0 < 0
- D. Python compares the second element and finds 1 > 3
(Choose 1 answer)
What makes JSON more suitable than XML for REST APIs?
Question 43
- A. Its syntax is simpler and aligns with JavaScript
- B. It is more verbose
- C. It is human-unreadable
- D. It requires no formatting
(Choose 1 answer)
What does the Python int() function do?
Question 44
- A. Returns an integer object from any number or string
- B. Connect to the network and retrieve a web page.
- C. Read the memory of the running program
- D. Take a screen shot from an area of the screen
(Choose 1 answer)
If you have the list numbers = [17, 123], what will be the result of numbers[1] = 5?
Question 45
- A. [17, 123]
- B. [5, 17]
- C. [17, 5]
- D. IndexError
(Choose 1 answer)
Which of the following HTTP requests are correct?
Question 46
- A. requests.tail("
You do not have permission to view link Đăng nhập hoặc Đăng ký.")- B. requests.put("
You do not have permission to view link Đăng nhập hoặc Đăng ký.", data = {'key':'value'})- C. requests.put('
You do not have permission to view link Đăng nhập hoặc Đăng ký.')- D. requests.get('
You do not have permission to view link Đăng nhập hoặc Đăng ký.', data = ['key':'value'])
(Choose 1 answer)
What character do you add to the + or * to indicate that the match is to be done in a non-greedy manner?
Question 47
- A. +
- B. $
- C. ?
- D. ^
(Choose 1 answer)
Which of the following is most like an open socket in an application?
Question 48
- A. An "in-progress" phone conversation
- B. Fiber optic cables
- C. The wheels on an automobile
- D. The chain on a bicycle
- E. The ringer on a telephone
(Choose 1 answer)
Which of the following are valid ways to specify the string literal foo'bar in Python:
Question 49
- A. "foo'bar"
- B. 'foo"bar"'
- C. foo'bar
- D. foobar
(Choose 1 answer)
What is the correct syntax to output the type of a variable or object in Python?
Question 50
- A. print(typeof(x))
- B. print(type(x))
- C. print(typeof x)
- D. print(typeOf(x))
(Choose 1 answer)
Which one is NOT a legal variable name?
- A. myvar
- B. Myvar
- C. My var
- D. My-var
Đính kèm
-
PRP201c SP26 FE_001.webp20.2 KB · Lượt xem: 1 -
PRP201c SP26 FE_002.webp17.8 KB · Lượt xem: 1 -
PRP201c SP26 FE_003.webp21.7 KB · Lượt xem: 0 -
PRP201c SP26 FE_004.webp17.6 KB · Lượt xem: 0 -
PRP201c SP26 FE_005.webp16.6 KB · Lượt xem: 0 -
PRP201c SP26 FE_006.webp22.5 KB · Lượt xem: 0 -
PRP201c SP26 FE_007.webp15.1 KB · Lượt xem: 0 -
PRP201c SP26 FE_008.webp26.6 KB · Lượt xem: 0 -
PRP201c SP26 FE_009.webp17.8 KB · Lượt xem: 0 -
PRP201c SP26 FE_010.webp21.4 KB · Lượt xem: 0 -
PRP201c SP26 FE_011.webp17.5 KB · Lượt xem: 0 -
PRP201c SP26 FE_012.webp23.4 KB · Lượt xem: 0 -
PRP201c SP26 FE_013.webp28.2 KB · Lượt xem: 0 -
PRP201c SP26 FE_014.webp15.6 KB · Lượt xem: 0 -
PRP201c SP26 FE_015.webp19.7 KB · Lượt xem: 0 -
PRP201c SP26 FE_016.webp18.6 KB · Lượt xem: 0 -
PRP201c SP26 FE_017.webp20.9 KB · Lượt xem: 0 -
PRP201c SP26 FE_018.webp18.3 KB · Lượt xem: 0 -
PRP201c SP26 FE_019.webp24.7 KB · Lượt xem: 0 -
PRP201c SP26 FE_020.webp19.8 KB · Lượt xem: 0 -
PRP201c SP26 FE_021.webp19.1 KB · Lượt xem: 0 -
PRP201c SP26 FE_022.webp35.1 KB · Lượt xem: 0 -
PRP201c SP26 FE_023.webp14.3 KB · Lượt xem: 0 -
PRP201c SP26 FE_024.webp15.5 KB · Lượt xem: 0 -
PRP201c SP26 FE_025.webp16.9 KB · Lượt xem: 0 -
PRP201c SP26 FE_026.webp19.7 KB · Lượt xem: 0 -
PRP201c SP26 FE_027.webp23.1 KB · Lượt xem: 0 -
PRP201c SP26 FE_028.webp22.5 KB · Lượt xem: 0 -
PRP201c SP26 FE_029.webp17.7 KB · Lượt xem: 0 -
PRP201c SP26 FE_030.webp15.4 KB · Lượt xem: 0 -
PRP201c SP26 FE_031.webp19.9 KB · Lượt xem: 0 -
PRP201c SP26 FE_032.webp31.2 KB · Lượt xem: 0 -
PRP201c SP26 FE_033.webp15.6 KB · Lượt xem: 0 -
PRP201c SP26 FE_034.webp18.3 KB · Lượt xem: 0 -
PRP201c SP26 FE_035.webp16.6 KB · Lượt xem: 0 -
PRP201c SP26 FE_036.webp22.6 KB · Lượt xem: 0 -
PRP201c SP26 FE_037.webp25.4 KB · Lượt xem: 0 -
PRP201c SP26 FE_038.webp20.8 KB · Lượt xem: 0 -
PRP201c SP26 FE_039.webp23.3 KB · Lượt xem: 0 -
PRP201c SP26 FE_040.webp17.2 KB · Lượt xem: 0 -
PRP201c SP26 FE_041.webp30.7 KB · Lượt xem: 0 -
PRP201c SP26 FE_042.webp17.3 KB · Lượt xem: 0 -
PRP201c SP26 FE_043.webp22.5 KB · Lượt xem: 0 -
PRP201c SP26 FE_044.webp17.8 KB · Lượt xem: 0 -
PRP201c SP26 FE_045.webp19.2 KB · Lượt xem: 0 -
PRP201c SP26 FE_046.webp15.1 KB · Lượt xem: 0 -
PRP201c SP26 FE_047.webp25.6 KB · Lượt xem: 0 -
PRP201c SP26 FE_048.webp14.4 KB · Lượt xem: 0 -
PRP201c SP26 FE_049.webp14.7 KB · Lượt xem: 1 -
PRP201c SP26 FE_050.webp14.2 KB · Lượt xem: 1