Recent content by K_Physics
-
Python User-Defined Function in Python
I got it to work! Thanks for the help!- K_Physics
- Post #12
- Forum: Programming and Computer Science
-
Python User-Defined Function in Python
This code was just designed to output the value of M, which happened to be around 1.7361319160639026 from math import sqrt L = 50 M = 0.0 for i in range(-L,L+1): for j in range(-L,L+1): for k in range(-L,L+1): if not (i==j==k==0): M +=...- K_Physics
- Post #9
- Forum: Programming and Computer Science
-
Python User-Defined Function in Python
The idea behind it was, the function will take the argument L multiple times list = [] L = 0 while int(L) < 50: list.append(L) L = int(L) + 1 print(function(L)) This way we can get the M values with the corresponding L value. I want to point out that I am a beginner. So I may not...- K_Physics
- Post #7
- Forum: Programming and Computer Science
-
Python User-Defined Function in Python
The end goal of the code is to graph values of L and the corresponding value of M with the use of user-defined functions. Sorry if this was unclear. I didn't continue to plot, as the values of M produced were incorrect.- K_Physics
- Post #5
- Forum: Programming and Computer Science
-
Python User-Defined Function in Python
Initially I was calculating only one value. In this new code, I have to graph values of L from 1-50 with the corresponding M value. The issue is, none of the M values were correct after changing it into a user-defined function.- K_Physics
- Post #3
- Forum: Programming and Computer Science
-
Python User-Defined Function in Python
Homework Statement So currently I'm working with user-defined functions. Initially, the code inside the user-defined function worked but when I attempted to change it into a user-defined function, it produces incorrect values. Homework Equations No need for any equations The Attempt at a...- K_Physics
- Thread
- Function Python
- Replies: 11
- Forum: Programming and Computer Science
-
Relative Intensity of Various Light Sources - Lab Experiment
Homework Statement I've linked my data table down below. My problem is the relative intensity column. From the table, the units of relative intensity are w/m/s. I'm assuming this is power/velocity, where velocity is the speed of light. However, nowhere in the lab manual did it mention the...- K_Physics
- Thread
- Experiment Geometrical optics Intensity Lab Light Optics Prism Relative Sources
- Replies: 1
- Forum: Introductory Physics Homework Help
-
Loudspeaker Question (Sound and Intensity)
Homework Statement Suppose a spherical loudspeaker emits sound isotropically at 10 W into a room with completely absorbent walls, floor, and ceiling (an anechoic chamber). (a) What is the intensity of the sound at distance d = 3.0 m from the center of the source? (b) What is the ratio of the...- K_Physics
- Thread
- Intensity Power Sound
- Replies: 1
- Forum: Introductory Physics Homework Help
-
Standing Waves On Strings: Harmonic and Frequency Problem
Thanks for the help! I will try the question both ways =D.- K_Physics
- Post #3
- Forum: Introductory Physics Homework Help
-
Standing Waves On Strings: Harmonic and Frequency Problem
Homework Statement String A is stretched between two clamps separated by distance L. String B, with the same linear density and under the same tension as string A. String B is stretched between two clamps separated by distance 4L. Consider the first eight harmonics of string B. For which of...- K_Physics
- Thread
- Frequency Harmonic Harmonic motion Standing waves Strings Waves
- Replies: 2
- Forum: Introductory Physics Homework Help