Servo and Pressure Sensor

I'm new to Arduino, and I am doing this project where a pressure sensor activates a 0-180 degree rotation servo.

#include <Servo.h>
Servo servo;
int reading;
int pos=0;
void setup(void) {
Serial.begin(9600);
servo.attach(9); //servo at digital pin 9
servo.write(0); //initial point for servo

}

void loop(void) {
int value;
reading = analogRead(A0); //attached to analog 0
Serial.print("Sensor value = ");
Serial.println(reading);
if(reading>950){
value = map(reading, 180, 360, 360, 180);}
else{for (pos = 0; pos <= 180; pos += 1) {
delay(15);
}
for (pos = 180; pos >= 0; pos -= 1) {
delay(15);
}}

servo.write(value);

delay(100);
}

I found a code made by a user named Anas Siddiqui, I changed it a little because I do not want to use someone else's researched code to my use. However, this person did not provide any information on what the code is, or what is for what.
Any advice or things that may be able to help would be very appreciated. (BTW this is for an arduino UNO.

Keep every } on a line by itself with no other code on that line. Not even another }.

Keep every { at the end of the line (after a for() or if(), for example) and don't put any code after it. Some people like to keep the { alone on a line the same as the }.

Run the auto-format function in the Arduino IDE to clean up the indentation of your code.

Post it again here, in code tags. (Read how-to-use-this-forum.)

if(reading>950){
  value = map(reading, 180, 360, 360, 180);}

You might want to read up on how the map() function works. The above is probably not doing what you think. Print the value variable to see what is returned by the map function.

What is the code supposed to do?
What does it do instead?