Page 348 - Informatics_Practices_Fliipbook_Class12
P. 348
Immutable built-in types:
• Strings
• Tuples
• Numbers
7. Evaluate the following expressions:
(i) 6 * 3 + 4**2 // 5 – 8
(ii) 10 > 5 and 7 > 12 or not 18 > 3
Ans. (i) 13
(ii) False
8. What do you understand by the term iteration?
Ans. Repeatation of statement/s finite number of times is known as iteration.
9. Differentiate between HTTP and HTTPS.
Ans. HTTP does not encrypt the data when transferring whereas HTTPS uses data encryption to transfer data in
encrypted mode. As HTTPS provides SSL or TLS Digital Certificate to secure the communication between the
server and the client, HTTPS is far more secure than HTTP.
10. What is the use of // operator in Python?
Ans. It is a divide and truncate the quotient operator; for example, 15//4 -->3, 15//4.0 -->
3.0, 15.0//4.0 --> 3.0. Note that if one (both) of the operands is (are) floating point numbers, it yields a floating
point number.
11. Write any two features of star topology.
Ans. (i) Each node(device) in the star topology is connected to a central hub.
(ii) If a node stops working it does not affect the entire network.
12. What are literals in Python?
Ans. A literal is a fixed value, examples include string literals, numeric literals, and boolean literals.
13. What is a Dictionary in Python?
Ans. Dictionary is an important built-in data type in Python. It defines one-to-one relationship between keys and
values. Dictionaries contain a pair of keys and their corresponding values.
Dictionaries are indexed by keys.
14. Write the names of some commonly used networking devices.
Ans. Modem, repeater, router, gateway, hubs, and switch.
15. Two universities in different states want to exchange information. Which type of network do they need?
Ans. Most likely, a WAN would be a suitable network because of the large distance involved. However, the two
Universities in different states could also be just opposite each other, and a WiFi LAN could also be fine.
16. How will you reverse a list?
Ans. list.reverse() − Reverses items of list in place.
17. Differentiate between a candidate key and a primary key for a relation in SQL.
Ans. A candidate key is any column or combination of columns that could be used as a primary key, whereas a primary
key is the chosen candidate key that uniquely identifies rows and enforces entity integrity in the table.
334 Touchpad Informatics Practices-XII

