Richard Feynman visited Rio de Janeiro while teaching physics in Brazil in the early 1950s.
Feynman spent several weeks in Rio in July 1949 and later chose Brazil for his 1951–1952 sabbatical. During that sabbatical he gave courses at the Centro Brasileiro de Pesquisas Físicas, making Rio the setting for an important teaching episode in his career.
His Brazilian stay was more than an academic visit. Feynman became fascinated by samba and learned to play the frigideira, a metal percussion instrument based on a frying pan. He also played bongo and conga drums and participated in musical performances.
The question can cause confusion because Brazil’s major cities are often treated interchangeably in casual accounts. Brasília was not yet Brazil’s capital during Feynman’s visit—it became the capital in 1960—and São Paulo and Salvador were not the city associated with his physics teaching. The documented location was Rio de Janeiro.