New York's Democratic mayoral primary ends Monday after a final week's flurry of debates, endorsements and corkscrew policy turns that might satisfy the appetite of even the most avid campaign junkie.

Rep. Edward Koch and N.Y.Secretary of State Mario Cuomo finished first and second, respectively, in the Sept. 8 first primary round and immediately had to begin maneuvering to win the vote of the 60per cent of Democrats who voted for one of the five losers.

As the week drew to a close, the betting in the newsrooms and precinct halls was that Koch had maneuvered better and would carry off the Democratic nomination which almost assures election, since New York Democrats outnumber Republicans four to one.

The scramble to make political gains during the 10 days between the first vote and therunoff has produced twists including the following:

Koch, the candidate accused by some black leaders two weeks ago of using racial code words to attract white votes, ended up with most of the endorsements of powerful black politicians.

Cuomo, the candidate who had sadi the death penalty was an irrelevant issue since it is not for a mayorto set punishments, now raises the death penalty almost every chance he gets. At his most bombastic he accused Koch, who favors capital punishment for some crimes, of promising New Yorkers: "I will give you the electric chair, I will give you death."

Gov. Hugh Carey began to squirm in a trap of his own making. Carey pushed Cuomo into the race after refusing an appeal for support from Koch. Carey was also instrumental in securing the Liberal Party nomination for Cuomo and pledged that he would support his man in the November general election against the Democratic nominee. But the Democratic governor - who runs for re-election next year - now appears to be to take on his party and so he uneager began backing away from his "all the way" support last week. Asked to comment, Koch quipped: "The governor put Mario Cuomo in the race and I suppose the governor can take Mario Cuomo out of the race."

Carey and lame duck Mayor Abraham Beame (who ran third to Koch and Cuomo) are bitter enemies. so Beame endorsed Koch. Now, if Carey switches, the enemies will be behind the same candidate after months of bitter feuding.

Today, former Rep. Bella Abzug (who finished fourth in the first primary) came out for Cuomo. Her choice seemed motivated principally by friction with Koch aggravated during the campaign. Thus, a feminist who has been a staunch advocate of women's rights and abortion on demand turned her back on a man who takes these positions (Koch) to support an Italian Catholic (Cuomo) who gives less than all-out support to such key feminist issues.

Victor Gotbaum, head of the most important municipal union, endorsed Cuomo after saying election night that he would urge his executive board to remain neutral in a Koch-Cuomo primary.

The most dazzling footwork award would appear to belong to Rep. Herman Badillo who finished sixth in the seven-candidate primary. Immediately after the race, he joined with Abzug and Manhattan Borough President Percy Sutton (who finished fifth) in announcing they would examine the two candidates and decide together which best represented the nonwhite and poor voters whom they in great part represent.

Less than 24 hours later, before fellow screeners Abzug and Sutton had met with Koch, Badillo had been to see him and decided to endorse him. Badillo instantly became Koch's third campaign cochairman. Sutton is the only member of the short-lived troika who remains neutral.

Perhaps the most startling changes since the first vote, however,had been in the attitudes and tactics of Koch and Cuomo.

They were the two heaviest spenders on television advertising during the first round and each has spent at least another $100,000 in the runoff.

Koch, who described himself in person and in his ads all summer as the candidate who addressed the issues, elected for the runoff to drop the issues and spotlight all the people who now support him.

The congressman, who spent the summer speaking to small groups on the streets and beaches with no important supporters beside him except Bess Meyerson, a former Miss America and city commissioner for consummer affairs, is now experiencing the front runner's luxury of having crowds eager to get close to him. His new TV ads show prominent face after face saying "I'm for Ed Koch."

Cuomo's media man Gerald Rafshoon - who rocketed to sucess as his presidential candidate, Jimmy Carter, went from obscurity to the White House - did ads this summer portraying Cuomo as a warm, relaxed family man with his wife and five children in their middle-class Queens neighborhood.

Mario to me is the urban, ethnic side of Jimmy Carter," Rafshoon told The New York Times.

For the run-off, Rafshoon and Cuomo's other advisers, who include Carter pollster Patrick Caddell, decided to give their candidate a tough-guy side.

Two commercials went on the air last week which open with photographs of Koch. In one, the Koch head flips from facing left to facing right as a narrator's voice accuses Koch of being liberal on a lot of issues as a congressman in Washington and conservative on the same issues during his bid for mayor.

The choice Monday, Cuomo is fond of saying, is "between constancy [Cuomo] and expediency [Koch]."

The second new advertisement caused a dispute within the Cuomo campaign and reportedly angered Cuomo himself.

With Koch's face on the screen, the narrator asks whether voters don't find a familiar ring to the fact that Koch comes from Manhattan "but claims to understand the neighborhoods" and that he promises to be tough on municipal unions. It asks who preceded Koch as the representative of the 17th District.

The screen provides a visual answer as Koch's face is slowly transformed into that of former Mayor John Lindsay.

Recent polls have found Lindsay extremely unpopular and that gave impetus to the ad, but many politicians in both camps called it a low blow and it was withdrawn from circulation. Cuomo publicly defended it despite his private anger, but said it was withdrawn because if offended his wife.

Koch campaign officials publicly spoke seriously of their fears that the ads. which they said reminded them of Nixonian techniques, would harm their man. Privately, they were chuckling over the telephone calls to their headquarters from people so offended by the ad they wanted to declare themselves Koch supporters.

For his part, Koch's decision not to stress issues during the runoff has left the impression that he is seeking to refurbish his liberal standing (he gets high ratings from Americans for Democratic Action for his congressional votes) which was somewhat muddied by his advocacy of calling out the National Guard during any blackout and of capital punishment in some cases.