5.6k views
1 vote
Given: A Fiber Link with length of 800 km, bandwidth of 1 Gbps, and speed of medium/light of 200,000 km/sec.Write a short Python program to calculate the propagation delay of a link. You need to ask the user to enter the link length and the medium speed. Show the program/code and an example of the output

User Rputikar
by
5.2k points

1 Answer

2 votes

Answer:

Written in Python

linklength = float(input("Link Length: "))

mediumspeed = float(input("Medium Speed: "))

prop = linklength/mediumspeed

print("Propagation Delay: "+str(prop))

Step-by-step explanation:

The next two lines prompt user for input

linklength = float(input("Link Length: "))

mediumspeed = float(input("Medium Speed: "))

This line calculates the propagation delay

prop = linklength/mediumspeed

This line prints the calculated propagation delay

print("Propagation Delay: "+str(prop))

See attachment for program output

Given: A Fiber Link with length of 800 km, bandwidth of 1 Gbps, and speed of medium-example-1
User Messedup
by
4.9k points