In computer science, a for-loop (or simply for loop) is a control flow statement for specifying iteration, which allows code to be executed repeatedly. Various keywords are used to specify this statement: descendants of ALGOL use "for", while descendants of Fortran use "do". There are other possibilities, for example COBOL which uses "PERFORM VARYING".
A for-loop has two parts: a header specifying the iteration, and a body which is executed once per iteration. The header often declares an explicit loop counter or loop variable, which allows the body to know which iteration is being executed. For-loops are typically used when the number of iterations is known before entering the loop. For-loops can be thought of as shorthands for while-loops which increment and test a loop variable.
The name for-loop comes from the word for, which is used as the keyword in many programming languages to introduce a for-loop. The term in English dates to ALGOL 58 and was popularized in the influential later ALGOL 60; it is the direct translation of the earlier German für, used in Superplan (1949–1951) by Heinz Rutishauser, who also was involved in defining ALGOL 58 and ALGOL 60. The loop body is executed "for" the given values of the loop variable, though this is more explicit in the ALGOL version of the statement, in which a list of possible values and/or increments can be specified.
In FORTRAN and PL/I, the keyword DO is used for the same thing and it is called a do-loop; this is different from a do-while loop.
Homework Statement
A circular loop of radius 0.10 m is rotating in a uniform external magnetic field of 0.20 T. Find the magnetic flux through the loop due to the external field when the plane of the loop and the magnetic field vector are
(a) parallel.
(b) perpendicular.Homework Equations...
Homework Statement
Find the force on the triangular loop in the figure:
I am trying to do this in cylindrical polar coordinates, because it builds character.
Homework Equations
$$\vec{B}(\vec{r}) = \frac{\mu _0}{4\pi} \int \frac{I(d\vec{l} \times \hat{\alpha})}{|\vec{\alpha}|^2}$$
Where alpha...
Homework Statement
A 15-turn rectangular loop of wire of width 10 cm and length 20 cm has a current of 2.5 A flowing through it. Two sides of the loop are oriented parallel to a uniform magnetic field of strength 0.037 T, and the other two sides are perpendicular to the magnetic field. (a) What...
Homework Statement
A small circular flexible loop of wire of radius R carries a current I. It is placed in a uniform magnetic field B. The tension in the loop will be double if
A) I is doubled B) B is halved C) r is doubled D) both B and I are doubled.
Homework Equations
The Attempt at a...
I have some trouble fully understanding the PLL block diagram shown below in the figure. The PLL circuit is used to generate currents (i alpha and i beta) which are in phase with the positive fundamental sequence of the voltage.
I am using the book "Instantaneous Power Theory and Applications...
Homework Statement
A single-turn wire loop produces a magnetic field of 41.2 μT at its center, and 5.15 nT on its axis, at 20.0 cm from the loop center.
Find loop raidus and current.
Homework Equations
F = qv x BThe Attempt at a Solution
I tried to use the above equation, but could not figure...
Hi
the difference between a loop antenna and a magnetic probe (B-Probe) is only that the loop antenna works in far field and B-Probe works in near field? The standard features of magnetic antenna (antenna factor, impedance matching, radiation patterns, efficiency, ecc) have the same definition...
Homework Statement
##G_{OL} = \frac{5}{s}##
##G_{CL} = \frac{KG_{OL}}{1+KG_{OL}}##
Homework EquationsThe Attempt at a Solution
It's pretty easy when the equation is so simple
##G_{CL} = \frac{K\frac{5}{s}}{1+K\frac{5}{s}}##
##G_{CL} = \frac{5K}{s+5K}##
If the open loop equation is really...
Homework Statement
The figure shows a 10-cm diameter loop in three different magnetic fields. The loop's resistance is 0.10 Ω. For each case, determine the induced emf, the induced current, and the direction of the current.
Homework Equations
Faraday's Law: εinduced= - (ΔΦb/Δt) = - A ⋅ ΔB...
Homework Statement
Homework EquationsThe Attempt at a Solution
This is what i did about (a)
but i don't know how to approach (b), it doesn't have x,y components, only Bz component.
Homework Statement
The problem asks to find the Total Force on the Circuit Loop. I have a circuit loop with length 30.0 cm and width 10.0 cm with a current I2= 30.0 A that is flowing counter-clockwise. There is a wire that has the current I1=15.0 A flowing from left to right and is 7.50 cm from...
Hiya,
I'm struggling to find/figure out some kind of intuitive explanation why it is the changing flux of the contained area that matters for Faraday's law of induction. It appears odd to me that it is the change of flux through the contained area that matters, rather than the flux that goes...
Homework Statement
A small car with mass .800 kg travels at a constant speed of 12m/s on the inside of a track that is a vertical circle with radius 5.0m. If the normal force exerted by the track on the car when it is at the top of the track is 6.00N, what is the normal force at the bottom of...
Homework Statement
A loop of wire in the form of a square 1.50 m on each side, its plane makes an angle of 40.0° with a uniform magnetic field of 0.95 T. What is the magnetic flux through the loop?
Homework Equations
Φ = BAcosθ
A = s^2
The Attempt at a Solution
I found the area of the square...
Hello!
When calculating the load factor in a loop the formula is n=V^2/(g*R)+cos(teta) during pull-up of a loop and another formula is n=1/cos(phi) during a level-flight banked turn. How does one combine these to calculate the load factor during a twisted loop?
Homework Statement
A rectangular loop of wire with sides H = 22 cm and W = 77 cm is located in a region containing a constant magnetic field B = 0.82 T that is aligned with the positive y-axis as shown. The loop carries current I = 334 mA. The plane of the loop is inclined at an angle θ = 30°...
Homework Statement
Homework EquationsThe Attempt at a Solution
I have the complete solutions for this problem, I just don't understand them:
This is the first part. I don't understand what r' is, or how we found it. Otherwise I understand the concept of the problem just not the details...
Homework Statement
A small toy car slides down an elaborate track. At one point during this trip, the car will go around a vertical loop with radius 15cm as shown. What is the minimum speed the car must have at the bottom of the loop in order to make it all the way around the loop without...
Homework Statement
Homework Equations
C=Δq/VThe Attempt at a Solution
So part a:
The capacitance of 3 should be the difference in charge of b and a divided by the voltage of the circuit?
C3=(14μC-6μC)/12V
=6.67*10-7 F
This was wrong...
Homework Statement
I = 0.47 A
ε1 = 16.0 V
ε2 = 8.0 V
R1 = 5.0 Ω
R2 = 9.0 Ω
r1 = 1.6 Ω
r2 = 1.4 Ω
a) Find the terminal voltage Vab of the 16.0 V Battery
b) Find the potential difference Vac of point a with respect to point c
Homework Equations
Vab = Va - Vb = ε1 - Ir1
Vac = Va - Vc = IR1 + ε2...
One of the Feynman rules of QED is the following:
For a closed fermionic loop, the Feynman rule is to start at an arbitrary vertex or propagator, follow the line until we get back to the starting point, multiply all the vertices and the propagators in the order of the line, then take the trace...
Hello there, this isn't necessarily a homework question. I came across this qn during revision and didn't know how to solve it. Any help would be greatyly appreciated.
The answer is 0.97
1. Homework Statement
For the ideal OP-Amp in negative feedback configuration shown in Figure Q30...
Homework Statement
A circuit is constructed with four resistors, one capacitor, one battery and a switch as shown. The values for the resistors are: R1 = R2 = 41 Ω, R3 = 68 Ω and R4 = 154 Ω. The capacitance is C = 49 μF and the battery voltage is V = 12 V. The positive terminal of the battery...
I have tried a bunch of different ways to edit this problem. The user input is 4 and I keep getting a output of 8 or 0. I appreciate the help!
The problem is:
"Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequence...
I have to admit I am not good on physics but I am willing to try to understand how is possible for a plane or a glide that's falling without thrust applied downward to make a loop (by changing direction or using the elevators on the tail of plane, like in this picture.
I am try to write a...
I have a recycle loop system:
Please could someone give me a place to understand the theory behind it? What would be its purpose? Where would it be used?
I've googled recycle loop systems but I can't find anything relevant, is it the same as a pressurized water reactor...
Hi, guys I am very new to programming in fortran90 and I am just experimenting with stuff. I have been trying to get my output of my loop program to a text file. But for some reason it will not work. Could someone please advise.
Code displayed below:
PROGRAM loop
IMPLICIT NONE
integer ...
Homework Statement
An empty ball , of mass m moment of inertia I = (2m.r²)/3, is rolling across the path shown below :
there is friction fr from A to C .
r is the radius of the ball , and R is the radius of the circular part within the path .
what would be the minimal height h , so...
Here is the code. I have binary list of ones and zeros and I want to see the values of the consequtive ones. For example, 111=3 and 11=2
So I created a count loop and increment the count when A is not 0. Then I tried to update the count to 0 once the for loop got to 0 again, but for some...
Homework Statement
A ball with radius ##r## is inside a hollow cylinder with radius ##r+R##.
In the first part of the assignment, one has to calculate the minimum kinetic energy the ball has to have at the bottom in order to complete a full loop in the cylinder. It turns out to be...
Homework Statement
Determine the mutual inductance between a very long, straight wire and a conducting equilateral triangular loop
Homework Equations
I know how to do it but I'm stuck at the step of finding the total inductance through the triange.
The Attempt at a Solution
we know that the...
Homework Statement
Given a string and a non-empty word string, return a string made of each char just before and just after every appearance of the word in the string. Ignore cases where there is no char before or after the word, and a char may be included twice if it is between two words...
this paper
https://arxiv.org/abs/1701.02311
Hypercuboidal renormalization in spin foam quantum gravity
Benjamin Bahr, Sebastian Steinhaus
(Submitted on 9 Jan 2017)
In this article we apply background-independent renormalization group methods to spin foam quantum gravity. It is aimed at...
https://arxiv.org/abs/1411.1935
This paper says LQG does not produce the Unruh effect effect, and therefore must be wrong. What do you guys think.
You can click into the PDF to see the entire paper.
Unifying Equation
Albert Einstein searched unsuccessfully for the unifying equation of physics (30 years).
Has anyone found it yet? Did I miss the memo? If not, did everyone give up? With all our super computers and millions of scientists on the planet it surprises me someone hasn't figured...
Homework Statement
Homework Equations
Flux = DeltaB * Area
The Attempt at a Solution : Since the magnetic fields are going in opposite directions through the loop, I assumed that they would have different signs, so I chose 2.0 T to be positive and 1.0 to be negative, so when calculating the...
Homework Statement
A conductor consists of a circular loop of radius R and two long, straight sections as shown in the figure. The wire lies in the plane of the page and carries a current I.
(a) What is the direction of the magnetic field at the center of the loop?
(b) Find an expression for...
im writing a 2d space simulator and in it i want to simulate rockets as well as things like space elevators and spaceguns to allow players to compare how each system works and compare pros and cons. one idea i want to include in that simulator is my own that i want to promote to the new...
Homework Statement
In my AP Physics class we need to design a loop that pulls around 4 G's. From what I understand, the diameter of the loop must be 2/5 times the initial drop. I cannot seems to get the G forces around 4. Any help? I found that the Clothoid loop reduces G forces but I can't...
Homework Statement
Suppose a magnetic monopole q_m passes through a resistanceless loop of wire with self-inductance L. What current is induced in the loop?
Homework Equations
\nabla \times \textbf{E} = - \mu_0 \textbf{J}_m - \frac{\partial \textbf{B}}{\partial t}
\nabla \cdot \textbf{B} =...
Hi. So we have all seen the band diagram of a PN junction. In order for the fermi level to be the same on both sides, the P bands are shifted up or the N bands are shifted down. Now that the fermi levels are equal, what would happen if you bent the diode into a ring (annulus) shape? How would...
recently this paper
Quantum Gravity in the Sky: Interplay between fundamental theory and observations
Abhay Ashtekar, Brajesh Gupt
(Submitted on 15 Aug 2016 (v1), last revised 12 Nov 2016 (this version, v2))
Observational missions have provided us with a reliable model of the evolution of the...
Hello,
I am in my first class for C++, so I apologize in advance if this question is amateurish. To be clear, this project is already finished, and what I am trying to do already counted points off against me; I am not interested in cheating, I just want to know what the answer to my issue is...
Hello Forum,
In DC circuits, I understand that a ground is a point or an entire conductor where the electric potential is set to be V=0 and the potential V at any other point in the circuit is referenced to that.
How does the the concept of ground loops work? Why are they not desirable?
What...
Homework Statement
steady-state current through the loop will be of the form Bsin(1000t +b). What is the phase angle 'b'? in rads
Homework EquationsThe Attempt at a Solution
[/B]
The answer is meant to be 0.46rads/s. However I am getting 9.65x10^-5??
I have no idea what I did wrong.
I...
Homework Statement
Loop of current ##I## sitting in the xy plane. Current goes in counter clockwise direction as seen from positive z axis. Find:
a) the magnetic dipole moment
b) the approximate magnetic field at points far from the origin
c) show that, for points on the z axis, your answer is...
Homework Statement
This is a theoretical question, one I'm not sure about. It just randomly popped into my head.
Say there is a jumbled wire, one in a glob shape but not overlapping. (Like a deformed circle, or maybe just a rectangle).
Assuming we are in a place called "physics utopia" where...
Homework Statement
Find the total maximum induced current for the diamond-shaped metal loop that is moving at a speed of 10 m/s towards a uniform magnetic field of 0.8T. All four lengths equal 10 cm or 0.01 m.
Homework Equations
emf = -dΦB/dt
ΦB=∫B*dA
A = (1/2)bh
The Attempt at a Solution
I...