Answer:
The solution code is written in Python:
- def square(num):
- if type(num).__name__ == 'int':
- sq_num = num * num
- return sq_num
- else:
- return "Invalid input"
-
- print(square(5))
- print(square("Test"))
Explanation:
To ensure only certain type of operation can be applied on a input value, we can check the data type of the input value. For example, we define a function and name it as <em>square</em> which take one input number, <em>num </em>(Line 1).
Before the <em>num</em> can be squared, it goes through a validation mechanism in by setting an if condition (Line 2) to check if the data type of the input number is an integer,<em> int.</em> If so, the<em> num </em>will only be squared otherwise it return an error message (Line 6).
We can test our function by passing value of 5 and "Test" string. We will get program output:
25
Invalid input
Answer:
Translation : Distributed Databases
Explanation:
Answer:
idrk tbh
Explanation:mhmmmmmmmmmmmmmmmmmmmmm
Data Editing is the answer
Answer: network topology is the arrangement of nodes which includes routers and switches so that enables connection between the server and the client.
however due to times when there is huge traffic in the nodes there needs to be an optimal path for the exchange of information which is accomplished by different routing protocols.
Explanation:
Routing Information Protocol(RIP) is one such protocol which enables to route packets from the source to the destination having the least possible traffic along its path. There are two sets of routing algorithm which are
1. Static routing protocols
2. Dynamic routing protocols.
The difference between the two is that dynamic routing protocols helps to construct the routing tables dynamically as compared to static routing.
RIP is a type of dynamic routing whereby it sends the contents of its routing table the adjacent routers every 30 seconds and whenever a route is discarded from the routing table it is marked as unusable.
RIp is supported by almost all routers and also supports load balancing which is one of it advantages.