EdocGram
Home
(current)
Topics
EdocAI
Code Editor
HTML
Javascript
PHP
Python
Python AI Code Editor
More
Contact
About
Privacy Policy
Terms and Conditions
Log In
Topic: Matrix Manipulation Problem / Level: beginner
Problem:
Write a program to print all prime elements in the first and last columns of a square matrix.
More Problems
Write a program to replace all prime numbers in the matrix with their square roots.
Write a program to replace all composite numbers in the matrix with their cube roots.
Write a program to print all diagonal elements that are divisible by both 3 and 5.
Write a program to print all border elements that are divisible by both 4 and 6.
Write a program to check if the sum of all elements in the middle diagonal is an even number.
Write a program to check if the product of all elements in the middle diagonal is an odd number.
Write a program to replace all odd elements in the matrix with -1 and even elements with 1.
Write a program to replace all even elements in the matrix with -2 and odd elements with 2.
Python
Language
Editor
Run & Output
Save
AI Code Generate
AI Test Case
Run the code to see the output here...