Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

make a python program that does the following: For inputs, you will prompt the user to enter (in this order): Indices of refraction for the

make a python program that does the following:

For inputs, you will prompt the user to enter (in this order):

Indices of refraction for the two media. Input them as lists or tuples (i.e one line input).

Incoming angle 1 in degrees (1 value).

Vertical distances through the media from the point where the light ray starts (d1, d2, in Figure 1). Again, these will be input as lists or tuples.

After entering the values, you need to check them for obvious errors. Next, calculate and output the final horizontal distance (d3 in Figure 1). If the ray will not pass between media (i.e., it gets reflected), your program should display an error and terminate. Your file should be named

equation 1= n*sin()=n2*sin()

may use diffrent equation if wish

Enter indices of refraction for bottom two media:

1.26 1.33

Enter angle of incidence (in degrees):

48

Enter d1 and d2 (units):

1 1

Ending distance is:

2.102 units

Enter indices of refraction for bottom two media:

2 1

Enter angle of incidence (in degrees):

40

Enter d1, d2 (units):

1.25 2.3

Error, no refraction in the second media

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

Students also viewed these Databases questions

Question

Define the term contribution margin . Discuss.

Answered: 1 week ago