Find the best solutions to your questions at Westonci.ca, the premier Q&A platform with a community of knowledgeable experts. Get detailed and precise answers to your questions from a dedicated community of experts on our Q&A platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.
Sagot :
Answer:
hope this helped ,do consider giving brainliest
Explanation:
import numpy as np
#PrintArray Function
def printArray(array):
for i in range(len(array)):
for j in range(len(array[i])):
print(array[i][j], end= " ")
print()
#Flip horizontal function
def flipHorizontal(array):
#reversing the order of arrays
array2 = np.fliplr(array).copy() printArray(array2)
#Flip Vertical function
def flipVertical(array):
#Preserving the order of array and reversing each array.
array3 = np.flipud(array).copy() printArray(array3)
#Main() function def main():
array = [[0,2,0,0,0],[0,2,0,0,0],[0,2,2,0,0],[0,2,0,2,0],[0,2,0,0,2]]
print("The array: \n")
printArray(array)
print("\nFlipped horizontally: \n") flipHorizontal(array)
print("\nFlipped vertically: \n") flipVertical(array)
if __name__=="__main__":
main()Explanation:
Answer:
Answer:
hope this helped ,do consider giving brainliest
Explanation:
import numpy as np
#PrintArray Function
def printArray(array):
for i in range(len(array)):
for j in range(len(array[i])):
print(array[i][j], end= " ")
print()
#Flip horizontal function
def flipHorizontal(array):
#reversing the order of arrays
array2 = np.fliplr(array).copy() printArray(array2)
#Flip Vertical function
def flipVertical(array):
#Preserving the order of array and reversing each array.
array3 = np.flipud(array).copy() printArray(array3)
#Main() function def main():
array = [[0,2,0,0,0],[0,2,0,0,0],[0,2,2,0,0],[0,2,0,2,0],[0,2,0,0,2]]
print("The array: \n")
printArray(array)
print("\nFlipped horizontally: \n") flipHorizontal(array)
print("\nFlipped vertically: \n") flipVertical(array)
if __name__=="__main__":
main()Explanation:
Explanation:
We appreciate your time. Please revisit us for more reliable answers to any questions you may have. Thank you for choosing our platform. We're dedicated to providing the best answers for all your questions. Visit us again. Thank you for trusting Westonci.ca. Don't forget to revisit us for more accurate and insightful answers.