Question: Program Language is python. I need help with the second part, this is what I got for the 1st question: My question is 2) a)
Program Language is python. I need help with the second part, this is what I got for the 1st question:
My question is 2)
a) Use this formula to find the peak wavelength(max) for a temperature (T) of 13,000 K.
The answer should have zero decimal points (for example: "300 nm").
b) How close is your result in the previous question (through Planck's law) to the analytical result (Wiens Law)? Calculate the difference and print it.
c) Re-run your algorithm in Question 1 with a step-size of 1 nm. How many iterations did it take to find the peak? How close is your result to Wiens Law now? Again, print your list(s) of wavelength and B values



Imax 2.898.10-3 = T The formula I'm given for the Planck function B(1,T) = 2hc? he ART 1. Write a program that determines where the peak of the Planck function occurs in wavelength for a given temperature. You must use a while loop to do this. a. solve this problem with a while loop. If the temperature of an object is T= 13,000 K, what is the peak wavelength (4)? Use 200 nm as your initial guess, and a step-size of +5 nm. b. Print your list(s) of wavelength and Bx values. Make sure to format your output so that wavelength has zero decimal points and is expressed in nm, and BA is expressed in scientific notation with 2 decimal points. 1 14 from math import exp 2 #defining constant 3 wave = 200 4 wavelist - 5 k = 1.38064852e-23 6 h - 6.62607094e-34 7 temp - 13000 8 C = 3e8 9 maxIter = 0 10 winc - 5 11 12 #defining planck function 13. def fun(lamb): return (2h*c**2)/(lamb **5*(expChc/(lamb*k*ter 15 16 B - fun(wave*le-9) #init value 17 Blist- 18 prevB = B 19 20 21. while maxIter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
