<h2>Solution :</h2>
The given problem is solved in Python.
def ComputeSquare():
side = float(input('Enter the side of the square: '))
if side > 0:
perimeter = 4 * side
area = side * side
print('Perimeter of the square is:',
perimeter, 'unit.')
print('Area of the square is:', area, 'square unit.')
<h3> else:</h3>
print('Invalid input.')
ComputeSquare()
<h2>Explanation :-</h2>
- In this program, we create a function ComputeSquare() to calculate the perimeter and area of a square.
- The function asks the user to enter the side of the square. The side is then stored in a variable.
- Now, we check whether the side is greater than 0 or not using if-else statement.
- If the condition is true, the perimeter and area is calculated which is displayed using print() statement.
- If the condition is false, the else blocks executes printing the error message.
<h3>Refer to the attachment for output.</h3>
Well I there’s bitcoins that people do use through phones... but the answer is false
Answer:
Client To Site.
Explanation:
The Client-to-Site is a virtual private network which used to provide the connection of the device like a laptop to the organization network. In the Client To Site a single computer is connected to the remotely network, for all the purpose and the intent of the network.
The single laptop is connected with a remote machine in the firewall. The "IPSec" protocol is used in the Client To Site connection.
Answer:
Explanation:
For example with the hierarchical network design of Cisco (three-layer) it is worth mentioning the following benefits:
- This type of infrastructure is highly reliable
- The complex problem regarding network design is broken into smaller and manageable areas.
- Improved access, access, core layers and distribution
- The hierarchy provides specific functions important in defining its role within the whole network.
Regarding the access layers in the hierarchy the following are core benefits:
- Layer 2 switching
- Virtual access control lists (VACLs)
- Power over Ethernet (PoE) and auxiliary VLANs for VoIP
- Spanning tree
- High availability
- Port security
- Address Resolution Protocol (ARP) inspection
In a polling-based network receives, the operating system keeps checking the status register after a fixed time interval to see whether a device needs hardware attention or not. CPU gradually checks the status of receive bit after a defined time interval of a clock and if the value of receive bit is true then data is moved from the RX register to the memory. In interrupt-based networks, whenever a device needs hardware processing then an interrupt is raised to inform the CPU for device attention. The data of the device is transferred to memory from the network card.
Polling is a protocol, not a hardware mechanism where the device gets attention by CPU. An interrupt is a hardware mechanism, not a protocol where the device gets attention by the interrupt handler. In polling, during receiving, parts of received data need to transfer to memory but in case of interrupts, whole data is transferred at once after receiving is done. An interrupt is a heavy operation as compared to pooling because hardware involves in it. For large amounts of data, Polling becomes an inefficient method. In polling, CPU gradually checks devices at regular intervals whereas the Interrupt handler can send interrupt at any time. Each device has its own Command ready bit which indicates whether the device requires servicing or not. In polling, CPU wastes numerous clock cycles by repetitively checking the command-ready little bit of each device. In Interrupt based network, the interrupt request line indicates whether the device requires servicing or not. In interrupt-based network, CPU cycles not wasted but CPU is disturbed only when device send interrupt signals.
Relative performance between programmed I/O and DMA:
For determining the relative performance between programmed I/O and DMA, important factors are:
1. Size of data
2. Frequency of operations