Answer:
...............................................
Explanation:
............................................................
1.
name = input("Enter your name: ")
num1 = int(input("Hello "+name+ ", enter an integer: "))
num2 = int(input(name+", enter another integer: "))
try:
if num1 % num2 == 0:
print("The first number is divisible by the second number")
else:
print("The first number is not divisible by the second number")
except ZeroDivisionError:
print("The first number is not divisible by the second number")
try:
if num2 % num1 == 0:
print("The second number is divisible by the first number")
else:
print("The second number is not divisible by the first number")
except ZeroDivisionError:
print("The second number is not divisible by the first number")
2.
import random, math
num1 = float(input("Enter a small decimal number: "))
num2 = float(input("Enter a large decimal number: "))
r = round(random.uniform(num1, num2), 2)
print("The volume of a sphere with radius " + str(r) + " is " + str(round(((4 / 3) * math.pi * (r ** 3)), 2)))
I hope this helps!
Answer:
In serial communication transfers one bit of data at a time, while parallel communication transfers many bits of data at the same time. Serial communication transmits the data bits sequentially, while parallel communication transmits data bits simultaneously, allowing greater amounts of data to be transferred.
-Serial communication is the one used to communicate the Arduino with the Computer through the USB cable.
-An example of a parallel port is the printer port. The Parallel Port was only created and used in the printers interface and the computers.
Explanation:
In <em>serial communication</em>, each bit is sent by its own clock flank where conditions are defined after each byte, if it is synchronous or asynchronous. In <em>parallel communication</em> there is only one single clock flank where the information is sent where it is an advantage to use it where there are several input or output data.
I hope it's help you.