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 the prime elements in the matrix with their negatives.
More Problems
Write a program to replace all the composite elements in the matrix with their negatives.
Write a program to count how many elements in the matrix are prime and even.
Write a program to count how many elements in the matrix are composite and odd.
Write a program to print the elements of the matrix in diagonal strips from top-left to bottom-right.
Write a program to print the elements of the matrix in diagonal strips from bottom-right to top-left.
Write a program to calculate the sum of all prime elements in the middle diagonal of a square matrix.
Write a program to print the matrix in a spiral pattern starting from the bottom-right corner.
Write a program to print the matrix in a reverse spiral pattern starting from the top-left corner.
Python
Language
Editor
Run & Output
Save
AI Code Generate
AI Test Case
Run the code to see the output here...