Sounding like men who have finished the toughest parts of their jobs, astronauts Thomas K. (Ken) Mattingly and Henry W. Hartsfield did nothing more taxing today than talk to people attending the World's Fair in Knoxville, Tenn.

"We'll be landing on the Fourth of July, and at that time we anticipate declaring the space shuttle operational," Hartsfield told World's Fair visitors as the astronauts passed over the Gulf of Mexico on their 65th orbit of Earth in the fourth test flight of the shuttle Columbia.

"It's kind of fitting that we land on July 4th and celebrate the ushering in of a new era just as our forefathers ushered an era of democracy for the whole world on the same date over 200 years ago," Hartsfield said in the astronauts' four-minute transmission.

Even flight directors in the Mission Control Center at the Johnson Space Center were sounding relaxed for the first time since Mattingly and Hartsfield rode Columbia into orbit last Sunday morning.

For the first time since the mission began, the astronauts began to sound like tourists instead of workers. They photographed thunderstorms over South America and gave a televised tour of the Caribbean Sea and parts of Africa.

"This is a geologist's delight up here," Mattingly said as the 100-ton Columbia passed over North Africa. "You can see the rifts and the fault zones, and you can see all of the volcanic sequences. It's what you see out in some parts of the western United States but on a much grander scale."

After ending their long spell with Columbia's bottom pointing toward the sun today, the astronauts had no trouble at all operating the cargo bay doors. Yesterday, one door would not close because it had been in the shade too long.

The doors must be closed so Mattingly and Hartsfield can return to Earth Sunday and must be opened in space to vent heat from the spacecraft.

"Whatever it was that caused the doors not to function properly the first time has been cleared," Flight Director Harold Draughon said. "There's a strong implication that the problem is thermal, one of distortion with the bulkhead or the doors themselves."

Once they demonstrated the closing and reopening of the doors, Mattingly and Hartsfield televised a scene in which Mattingly walked on a treadmill and Hartsfield exercised his legs on a rubberized rope device.

"I also have a device that's clipped on my ear where I can monitor my heart rate," Mattingly said. "It can keep time for me or how long I was on it. This morning I've calculated I walked about 6,000 miles."

When they finished exercising, Hartsfield moved to a cockpit console where he began operating the robot arm in the cargo bay although he did not televise any pictures of the bay because of its secret Air Force payload.

Late tonight, officials said the shuttle was expected to pass within 7.7 miles early Friday morning of the abandoned upper stage of a Soviet rocket used to launch a satellite 6 1/2 years ago. The astronauts were scheduled to be awake at the time anyway and planned to photograph the debris.

Later in the day, they are to begin the most serious preparations for Columbia's landing at Edwards Air Force Base in California.

The landing is scheduled at 12:09 p.m. (EDT) before a nationwide television audience and an estimated 500,000 onlookers, including the vacationing President Reagan.

Not since president Nixon witnessed the splashdown of Apollo XI in the Pacific Ocean 13 years ago has a U.S. president attended the landing of a manned space craft.