Answer:
def sum_digits(number):
total = 0
if 1 <= number <= 999:
while number > 0:
r = int (number % 10)
total +=r
number /= 10
else:
return -1
return total
print(sum_digits(658))
Explanation:
Write a function named sum_digits that takes one parameter, number
Check if the number is between 1 and 999. If it is, create a while loop that iterates until number is greater than 0. Get the last digit of the number using mudulo and add it to the total. Then, divide the number by 10 to move to the next digit. This process will continue until the number is equal to 0.
If the number is not in the given range, return -1, indicating invalid range.
Call the function and print the result
Answer:
B 4 seconds
Explanation:
You should stay 4 seconds away from a vehicle at all times at the same speed as the other vehicle or vehicles.
Answer:
There's a parking lot that is 600m² big. The lot must be able to hold at least 3 buses and 10 cars.
Each car takes up 6m² and each bus takes up 30m².
However, there can only be 60 vehicles in the lot at any given time.
The cost to park in the lot is $2.50 per day for cars and $7.50 per day for buses. The lot must make at least $75 each day to break even.
What is a possible car to bus ratio that would allow the lot to make profit?
Complete Question:
Firewall implementation and design for an enterprise can be a daunting task. Choices made early in the design process can have far-reaching security implications for years to come. Which of the following firewall architecture is designed to host servers that offer public services?
a) Bastion Host
b) Screened subnet
c) Screened host
d) Screened
Answer:
b) Screened subnet
Explanation:
In Computer science, Firewall implementation and design for an enterprise can be a daunting task. Choices made early in the design process can have far-reaching security implications for years to come.
Screened subnet firewall architecture is designed to host servers that offer public services.
In network security and management, one of the network architecture used by network engineers for the prevention of unauthorized access of data on a computer is a screened subnet. A screened subnet can be defined as a network architecture that uses a single firewall with three screening routers as a firewall.
<em>A screened subnet is also known as a triple-homed firewall, this is because it has three (3) network interfaces;</em>
1. Interface 1: it is known as the external or access router, which is a public interface and connects to the global internet.
2. Interface 2: it is known as the demilitarized zone or perimeter network, which acts as a buffer and hosted public servers (bastions host) are attached herein.
3. Interface 3: it is known as the internal router, which is a subnet that connects to an intranet.
<em>The screened subnet when properly configured helps to prevent access to the internal network or intranet. </em>
C... it’s c ok.......................