Find wavelength using distance and angle in python

Viewed 30

this is my professors example output

python
    This program calculates the wavelength given distance and angle
    Please enter the distance (nm): 0.025
    Please enter the angle (degrees): 25
    Wavelength is 0.0211 nm

this is my code

python

print("This program calculates the wavelength given distance and angle")
print("Please enter the distance (nm):")
nm = float(input())
print("Please enter the angle (degrees):")
d = float(input())
print("Wavelength is", nm * math.sin(d), "nm")    

my code does not get anywhere close to his output, I have no clue which formula to use in order to get the same answer as him using only distance and angle.

1 Answers
Related