Search results for query: *

  1. SamRoss

    Python Why do 0.1 and 1/10 work but 0.3-0.2 doesn't?

    I get that, but I know that 0.1 also cannot be represented in binary so why does the computer NOT have a problem with doing 1/10?
  2. SamRoss

    Python Why do 0.1 and 1/10 work but 0.3-0.2 doesn't?

    I understand that some numbers cannot be represented in floating point but I don't understand why the way we obtain those numbers matters. In python, if I type print(0.1) or print(1/10) I get 0.1 but if I type print(0.3-0.2) I get 0.09999999... Why the difference?
  3. SamRoss

    Really worried about Ukraine

    If it makes you feel any better, Biden is very strongly anti-war. He was a critic of our ongoing wars in the Middle East and the last thing he wants is to get involved in another drawn-out conflict.
  4. SamRoss

    How can I get the RUN button in Visual Studio Code to turn GREEN again?

    Yes, that is what I've been doing. I do have a heck of a lot of global variables which did seem awkward to me. I'll try the dictionary strategy and let you know how it goes.
  5. SamRoss

    How can I get the RUN button in Visual Studio Code to turn GREEN again?

    I'm not using git. In fact, although I've heard it mentioned over and over, I'm not really quite sure what it is. I suppose my next step should be to look into it. Dropbox is where I've been keeping all my important files for many years. Guess I'll have to make a change.
  6. SamRoss

    How can I get the RUN button in Visual Studio Code to turn GREEN again?

    Thanks for the help, @DaveC426913. What exactly do you need a screenshot of?
  7. SamRoss

    How can I get the RUN button in Visual Studio Code to turn GREEN again?

    No, I'm not. Should I be? Here are some pics of the make_worksheet function if it's helpful.
  8. SamRoss

    How can I get the RUN button in Visual Studio Code to turn GREEN again?

    Hello again @pbuk :) . I seem to be having the same problem even in the command prompt (except for the fact that running the master file from the command prompt did not stop other python files from working in vscode). Below are pictures of what's going on. I called my make_worksheet function to...
  9. SamRoss

    How can I get the RUN button in Visual Studio Code to turn GREEN again?

    Hi @Mark44. Thanks for the help. Unfortunately I'm still seeing the same behavior. It ran a couple times then stopped. I noticed something which might be a clue. I have a "make_worksheet" function which should generate as many versions of a worksheet as I want. After a couple run throughs with...
  10. SamRoss

    How can I get the RUN button in Visual Studio Code to turn GREEN again?

    I have been using Visual Studio Code for a couple months now and it has been fine. When I want to run some code, there is usually a little green triangle button in the top right corner that I can click on. A few days ago, that triangle turned white only for Python files (it is still green for...
  11. SamRoss

    LaTeX Trouble using PythonTex variables in Latex file

    I'm sure I will have use for it once I'm more comfortable doing some very simple things. Thank you again.
  12. SamRoss

    LaTeX Trouble using PythonTex variables in Latex file

    I did see that stackexchange post but when I tried copying and pasting the code, it didn't work. I downloaded TeXMaker and tried following your instructions but I'm still getting the same error. Here's what I did... 1. I entered the PythonTeX user command. 2. I chose PDFLaTeX from the...
  13. SamRoss

    LaTeX Trouble using PythonTex variables in Latex file

    Thanks very much. This seems to Thank you very much. I feel like I'm getting closer to solving this problem but I still have some questions. You said you used the steps pdflatex test.tex, pythontex test.tex, pdflatex test.tex. I'm not sure what you meant by that. Do you mean you converted the...
  14. SamRoss

    LaTeX Trouble using PythonTex variables in Latex file

    Thank you. Unfortunately I could not follow everything that was written on that page.
  15. SamRoss

    LaTeX Trouble using PythonTex variables in Latex file

    Thank you for your response. This might be something for me to look into later, but right now it is beyond my meager skills. The immediate problem I'm trying to solve is to make those double question marks going away so I can define some variables and have latex render them correctly.
  16. SamRoss

    LaTeX Trouble using PythonTex variables in Latex file

    Good news and bad news. The good news is the question marks went away. The bad news is nothing took their place.
  17. SamRoss

    LaTeX Trouble using PythonTex variables in Latex file

    I'm using Visual Studio Code as my text editor. My ultimate goal is to use PythonTex in a Latex file so that I can generate multiple versions of the same worksheet for my class. As a test, I defined a variable myvar = "hi" but I can't get it to render correctly in the pdf when I use \py{myvar}...
  18. SamRoss

    B Do any 3D Venn diagrams exist that have no 2D analogues?

    If we were to use three-dimensional spheres to represent sets, could a 3D Venn diagram be constructed that could not be drawn as a normal 2D Venn diagram without changing the relationships between the sets?
  19. SamRoss

    Good website to ask coding questions?

    I am trying to learn how to code, reading the info on w3schools, doing Google searches, etc. I recently ran into a small problem with MySQL and wanted to find a good website where I could post the issue I was having and see if anyone had any suggestions. I love PhysicsForums but I'm not sure...
  20. SamRoss

    I How can gravitons replace general relativity?

    I got it from Google images after typing something like "four fundamental forces" or "force carriers". I don't remember exactly. It seemed to outline some useful information in a concise way. Other than the words "acts between objects with mass" and "all particles with mass", is the information...
  21. SamRoss

    I How can gravitons replace general relativity?

    Are there any other problems with it?
  22. SamRoss

    I How can gravitons replace general relativity?

    Einstein's theory describes gravity as a curvature of spacetime. As such, everything is affected by it. This includes light, which has no mass, as was made clear for the first time during the famous 1919 solar eclipse. In the standard model, the cause of gravity is supposed to be gravitons...
  23. SamRoss

    B Simple forces described in terms of fundamental forces

    My first question is actually, what happens when any two objects get near each other? This question is often phrased as "Why can't you really touch anything?" or "Why can't you walk through walls?" I have heard two answers: 1. the repulsion between electrons 2. the Pauli exclusion principle...
  24. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    I guess the jump from two things producing the same field to those two things reacting in the same way to a nearby object is not so obvious to me. After all, the forces are supposed to act on charges, not fields. To make a weird analogy - if two people happen to draw the same waves in a...
  25. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    @alan123hk @Charles Link I was thinking about this thread again and one nagging thought occurred to me. I understand (hopefully) the equivalent current as the current that would produce the same magnetic field as is seen around the magnet and is in reality produced by the spin of the...
  26. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    All new knowledge is of interest. Thank you :)
  27. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    Thanks, @alan123hk ! This seems to be EXACTLY what I was looking for! A couple of quick questions to make sure I'm interpreting everything correctly... 1. The black arrows representing the equivalent magnetization current would be the v in the F = qv x B formula (and, of course, the red arrows...
  28. SamRoss

    Magnetic field lines around electron and wire seem to contradict

    I see. So in the first picture I posted, the current is pointing up but the electrons would actually be flowing down. Is that it?
  29. SamRoss

    Magnetic field lines around electron and wire seem to contradict

    In the picture below, the direction of the magnetic field lines can be determined by using the right-hand rule with the thumb pointing in the direction of the current. If we use the right hand rule in the picture below, thinking of the yellow arrow as the current, we would not get the correct...
  30. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    When I say "electric field line", I mean an imaginary line which can be drawn such that any charged particle will be accelerated in a direction parallel to the line. When I say "magnetic field line", I mean an imaginary line which can be drawn such that any moving charged particle will be...
  31. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    A slightly off-topic question - are the following statements true? 1. The ultimate source of any electric field is a charged particle. 2. The ultimate source of any magnetic field is either the movement of a charged particle or the intrinsic spin of a charged particle.
  32. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    I'm fine with integrals and vector operators.
  33. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    Does the derivation of ##\vec{F}_1 = \nabla (\vec{m}_1 \cdot \vec{B}_2)## involve the Lorentz force? If not, what does it involve?
  34. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    Isn't the Lorentz force a force on a charge which is in motion? Isn't this what the v in qv x B is all about?
  35. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    Thank you for your response. I am looking for a more intuitive answer based on the Lorentz force (if one exists). For example, we know that a positively charged particle will create an electric field pointing a way from it and a negatively charged particle will create an electric field pointing...
  36. SamRoss

    Magnetic attraction / repulsion from the Lorentz force

    I'm trying to understand how the Lorentz force can explain why magnets attract and repel. The explanations that I have found have mostly involved the magnets moving in a way that decreases the forces between them ( ) but I have not been able to find any intuitive explanation involving the...
  37. SamRoss

    I How is the weak force related to a change in velocity?

    Okay, so we're extending our idea of what we call a "force" to include not only something that results in acceleration but also something that results in particles decaying into other particles. The reason for this extension is that both acceleration and decay are the result of carrier particles...
  38. SamRoss

    I How is the weak force related to a change in velocity?

    Hi everyone, The four fundamental forces are gravity (I understand that G.R. does not look upon gravity as a force but I'm not worried about that here), the Lorentz force, the weak force, and the strong force. I'm familiar with the inverse square law for gravitation and the Lorentz force...
  39. SamRoss

    B Definition of the candela

    Right. Okay, I think I'm seeing where my thinking went off the rails. If we have light of many different frequencies then the luminosity function is sort of a filter which picks out the frequencies we can see and attaches different weights to them. I was confused about the need for the...
  40. SamRoss

    B Definition of the candela

    Okay, so I get that the units are not the same. There's still something that's bothering me, though. If the light is of only one frequency and the radiant intensity is within the limits of what the eye can handle, wouldn't the "weight" that we multiply the radiant intensity by to get the...
  41. SamRoss

    B Units of rigidity

    Now it makes sense! Thank you!
  42. SamRoss

    B Definition of the candela

    Alright, so that's one piece of the puzzle. I was assuming the luminosity function was dimensionless. So I suppose its dimensions are cd sr W^-1 ?
  43. SamRoss

    B Definition of the candela

    Is it correct to say luminous intensity = radiant intensity x luminosity function?
  44. SamRoss

    B Definition of the candela

    I'm trying to wrap my head around the definition of a candela: "The candela is the luminous intensity, in a given direction, of a source that emits monochromatic radiation of frequency 540×10^12 hertz and that has a radiant intensity in that direction of 1/683 watt per steradian." I'm aware...
  45. SamRoss

    B Units of rigidity

    So what do you think would be a simple way of explaining it to a student (and to me 😅).
  46. SamRoss

    B Units of rigidity

    https://www.explorelearning.com/index.cfm?method=cResource.dspView&ResourceID=1078 This is an activity I plan on doing with my middle school students.
  47. SamRoss

    B Units of rigidity

    In something I was reading, I saw the "stiffness" of a material measured in Newtons per meter which makes sense to me because something that is stiff would require more force to change its length. In other words, "Stiffness is the number of Newtons required to condense a material by one meter."...
Back
Top