At Westonci.ca, we connect you with the answers you need, thanks to our active and informed community. Discover in-depth answers to your questions from a wide network of experts on our user-friendly Q&A platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive 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 hope this was helpful. Please come back whenever you need more information or answers to your queries. Thanks for using our platform. We aim to provide accurate and up-to-date answers to all your queries. Come back soon. Thank you for trusting Westonci.ca. Don't forget to revisit us for more accurate and insightful answers.