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 replace all prime elements in the matrix with -1 and all composite elements with 1.
More Problems
Write a program to count how many odd numbers are there in the first row and last column.
Write a program to count how many even numbers are there in the last row and first column.
Write a program to print all diagonal elements that are divisible by 2 and 7.
Write a program to print all border elements that are divisible by 3 and 5.
Write a program to check if all elements in the matrix are multiples of 6 and 9.
Write a program to replace all diagonal elements with their factorial values.
Write a program to replace all border elements with their square root values.
Write a program to check if all diagonal elements are palindromes and even numbers.
Python
Language
Editor
Run & Output
Save
AI Code Generate
AI Test Case
Run the code to see the output here...