

The other component is the use of a step value in our for loops.įor example, the following code for i in range(1, 11, 2): Then go ahead and run it and see if you were right.

It is the third argument to range which determines the step. Notice that 11 is not displayed because the upper bound for range is not inclusive. Now we have the ingredients to solve the problem, there is just one final trick you will need to put them all together. This is to use the outer loop counter ( i in this case) as a parameter in the range of the inner loop. I have put a comment explaining how this works in my solution below. Solution for the 100 Doors Python Coding Challenge. # for the second pass, x = 2, so we start at door 2, for the 3rd pass we start at door 3 etc.ĭoors = not doors # using `not` to invert the Boolean value doors = * 101 # so we can start at door 1. He also stole her cellphone, according to the NYPD.# Print out just the positions of the open doors Police also say on March 27, Phanor, while riding a bike, approached a 39-year-old woman, pushed her to the ground, choked her and then sexually assaulted her near Clarkson Street and West Street. Police say he has also been charged with robbery, grand larceny, strangulation, predatory sexual assault and criminal sex act in connection to two other incidents.Īccording to police, Phanor stole a woman’s wallet and cellphone, and also attempted to rape her, on the FDR Drive service road near East 37th Street on Oct. Police have charged Phanor with rape, grand larceny, predatory sexual assault and use of a stolen credit card in connection to Thursday’s incident.

The victim was taken to a local hospital for treatment, police said. Police have arrested a man who they say is connected to three sexual attacks, including the rape of a woman near Hudson River Park Thursday morning.Īccording to police, Carl Phanor, 29, raped and robbed a woman who was jogging near Pier 45 around 5:30 a.m.
