Questions tagged [physics]
For challenges pertaining to problems in the field of Physics.
39 questions
32
votes
4
answers
3k
views
Volts, Amps, Watts and Ohms: given two, calculate the other two
Ohm's law tells us that the current (I) in amps flowing through a resistance (R) in Ohms when a voltage (V) is applied across it is given as follows:
V = I / R
...
19
votes
10
answers
1k
views
How far is the Sun?
Introduction
tl;dr
Continuously output the current distance from the Earth to the Sun.
Simplified, the orbit of the Earth around the Sun is an ellipse. So the actual distance between both is ...
12
votes
27
answers
2k
views
Calculate the relativistic velocity
In special relativity, the velocity of a moving object relative to another object that is moving in the opposite direction is given by the formula:
\begin{align}s = \frac{v+u}{1+vu/c^2}.\end{align}
<...
22
votes
48
answers
4k
views
Parallel resistance in electric circuits
Introduction:
Two resistors, R1 and R2, in parallel (denoted R1 || R2) have a combined ...
22
votes
3
answers
890
views
Name the Hadrons
Challenge
Given a quark composition of a particle as input, output the corresponding hadron's name.
Quarks will be represented by a capital letter and antiquarks by a lowercase letter.
The quarks ...
10
votes
2
answers
351
views
Construct a multiparticle quantum state
Sandboxed and made less complicated and hopefully more fun.
Summary of the challenge
Given a number of particles, either identical bosons or identical fermions, output the total wave function of the ...
37
votes
35
answers
5k
views
Draw the arc of a ball
Draw the parabolic trajectory of a thrown ball.
The input is the ball's initial upward velocity, a positive integer v. Every second, the ball moves ...
18
votes
10
answers
2k
views
Position from atomic number in the periodic table
Let us consider the following representation of the periodic table.
...
24
votes
22
answers
2k
views
Can this list be balanced?
To check whether a list of non-negative integers is balanced, one can imagine putting respective weights on a board and then try to balance the board on a pivot such that the summarized relative ...
13
votes
12
answers
3k
views
Simulate the ripple effect
Imagine throwing a rock into a pond. You get to see perfect circles of ripples spreading out over the pond, bouncing off of each other. Of course, nothing can be as serene as that in coding, but, we ...
40
votes
13
answers
5k
views
Recreate Minecraft's lighting
Minecraft has a fairly unique lighting system. Each block's light value is either one less than the brightest one surrounding it, or it is a light source itself. Your task is to write a method that ...
22
votes
14
answers
3k
views
Elastic collisions between blocks
The 3Blue1Brown Youtube channel released a video a year ago called "Why do colliding blocks compute pi?" which describes a model where a block A of mass \$a\$ ...
13
votes
3
answers
640
views
Physics golf: inclined shooting
An angry bird is shot at an angle \$β\$ to the horizontal at a speed \$u\$. The ground is steep, inclined at an angle \$α\$. Find the horizontal distance \$q\$ that the bird traveled before it hit the ...
19
votes
10
answers
5k
views
What do I need to destroy the world?
The gravitational binding energy of a planet is the amount of energy required to separate every tiny piece of it so that no piece will orbit or collide with another piece. For a uniform sphere, ...
39
votes
16
answers
3k
views
Will I tip over?
Overview
Given a 3 line string, figure out if the structure falls to the left, balances, or falls to the right.
Input structure
You can imagine the structure as metal rod with stuff on top, all being ...