Ishaku warned them to desist from such crimes and face their studies so that they would be useful to the society.
Isiyaka, 16, and Abdullahi, 15, who reside in Angwan Usama area of Masaka, were convicted for injuring a man, Abubakar Isah on the head.
The duo pleaded guilty to the charge.
The Judge, Mr Yakubu Ishaku, who gave the verdict, said the punishment would enable them to know the gravity of the offences they committed.
“This will also serve as a warning to others that have the mind to commit such crimes.
“I hereby order two court officials to give them seven strokes of the cane each,” he ruled.
Earlier, Police Prosecutor Frank Swem told the court that the teenagers had assaulted and injured the complainant, Abubakar Isah, leaving him with a head injury on August 11.
He said the offences contravened Sections 97, 265 and 242 of the Penal Code.