100 POINTS PLEASE HELP
Create and initialize a 5 x 5 array as shown below.
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

First, write a printArray() function that prints out the array. Use a single parameter in the definition of the function, and pass the array you created above as the parameter. Call the function so it prints the original array.

Then write a flipHorizontal() function that flips the contents of the array horizontally and prints the result. This means that the values in each row should be reversed (look at the second array in the sample run of the program for clarity). Again, this function should pass the original array as the parameter. Within your flipHorizontal() function, call the printArray() function to print the new array that has been horizontally flipped.

Reset the array back to the original 5 x 5 array we started with.

Then write a flipVertical() function that flips the contents of the array vertically and prints the result. This means that the values in each column should be reversed (look at the third array in the sample run of the program for clarity). Again, this function should pass the original array as the parameter. Within your flipVertical() function, call the printArray() function to print the new array that has been vertically flipped.

The sample run below shows how your code should print the original array, followed by the horizontally-flipped array, followed by the vertically-flipped array. Notice that the output below includes blank lines between each of the three arrays - yours should do the same.

Code should be able to do this

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


0 0 0 2 0
0 0 0 2 0
0 0 2 2 0
0 2 0 2 0
2 0 0 2 0


0 2 0 0 2
0 2 0 2 0
0 2 2 0 0
0 2 0 0 0
0 2 0 0 0

Answers

Answer 1

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 2

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:


Related Questions

how do I fix when it hits the second session it skips scanf..
#include <stdio.h>
#include <unistd.h>
#include <ctype.h>
main() {
double first, second;
while(1){
printf(" Calculator\n");
printf("\n 7 8 9 / \n 4 5 6 x \n 1 2 3 - \nEnter operator: ");
char op;
scanf("%c" ,&op); //entering operators such as + - \ *
printf("Enter two operands:");
scanf("%lf %lf", &first, &second); //entering operands such as 1 2 5 8 12 414
switch (op) { // printing the math
case '+'://if its +
printf("%.1lf + %.1lf = %lf\n\n", first, second, first + second);
break;
case '-'://if its -
printf("%.1lf - %.1lf = %lf\n\n", first, second, first - second);
break;
case '*'://if its *
printf("%.1lf * %.1lf = %lf\n\n", first, second, first * second);
break;
case '/'://if its :
printf("%.1lf / %.1lf = %lf\n\n", first, second, first / second);
break;
default://if its not + - / *
printf("error!");
}
}
}​

Answers

Answer:

the answer can be found HERE:

https://stackoverflow.com/a/13473767

put a leading space in the scanf(" %c", &op)

Explanation:

#include <stdio.h>

#include <unistd.h>

#include <ctype.h>

main() {

double first, second;

char op;

while(1){

printf(" Calculator\n");

printf("\n 7 8 9 / \n 4 5 6 x \n 1 2 3 - \nEnter operator: ");

scanf(" %c", &op); //entering operators such as + - \ *

printf("Enter two operands:");

scanf("%lf %lf", &first, &second); //entering operands such as 1 2 5 8 12 414

switch (op) { // printing the math

case '+'://if its +

   printf("%.1lf + %.1lf = %lf\n\n", first, second, first + second);

   break;

case '-'://if its -

   printf("%.1lf - %.1lf = %lf\n\n", first, second, first - second);

   break;

case '*'://if its *

   printf("%.1lf * %.1lf = %lf\n\n", first, second, first * second);

   break;

case '/'://if its :

   printf("%.1lf / %.1lf = %lf\n\n", first, second, first / second);

   break;

default://if its not + - / *

   printf("error!");

}

}

}

On a Windows computer, which tab can be used in Task Manager to set the priority given to a specific application or service?

Answers

Answer:

details tab

Explanation:

if you bet and another person bets do you get the money you bet and the money the other person bets?
example : say you bet on a computer game and your sister bets $5 and you bet $10 that you will win. Do you get the $10 and the $5 if you win from your sister or just the $5?​

Answers

Answer:

I believe you would get both because since you both did a bet and you won, that would mean you should automatically get both of what yall put down.

Explanation:

I think that's what should happen but I'm not sure though.

when would instant messaging be the least effective means of communication

Answers

Instant messaging would be least effective means of communication when you have a series of complex questions to ask your colleague.

What is the aim of instant messaging?

Instant messaging is often used as a means of sending textual messages, It is known to be a short one and also quick in nature. It can occur   between business colleagues and friends.

Its  disadvantages is that its is an Ineffective tool for mass communication and also has issues when used for system for archiving.

See options below

A. When you want your colleague to let you know if the hyperlink you sent her is working

B. When you want to tell someone "Happy Birthday!"

C. When you have a series of complex questions to ask your colleague

D. When you want to call an impromptu meeting between some of the people in your office

Learn more about instant messaging from

https://brainly.com/question/26271202

Answer:

When you have a series of complex questions to ask your colleague.

Explanation:

Asking these questions on instant messaging is the least professional way you can ask a colleague about series topics that involve your job, it would be more professional to ask this at work rather than on via message.

What is a critical consideration on using cloud-based file sharing and storage applications.

Answers

Answer:

Determine if the software or service is authorized

Explanation:

:)

Mateo wants the words "it’s snowing!" to appear in the output box and typed print (it’s snowing). this didn’t work. what needs to be added to the code?

a.
quotation marks
b.
a backslash
c.
a period
d.
a functional code

Answers

the answer is b . i just got this question right .

Answer:

a Quotation marks

Explanation:

In python, to print something it needs to have parenthesees and quotation marks.
a. Quotation marks

The software that requests mail delivery from the mail server to an Internet device is known as mail ____ software.

Answers

The software that requests mail delivery from the mail server to an Internet device is known as mail client software.

Explanation:

Mail client software is a form of communication in which electronic messages are created and transferred between two or multiple devices connected to a network series or stream.

Unit 6: Lesson 2 - Coding Activity 3 for projectstem. Org coding thing

Answers

Project Stem was founded as a 501(c)(3) non-profit corporation. Its goal is to help students get the confidence they need to participate, learn, and continue in the subject of computer science.

What is a Coding Activity?

A coding activity refers to activities that help the students learn to code. Some of the activities are designed as:

GamesPuzzles and Actual assignment.

Examples of coding activities could be:

To guide a Jupiter RoverTo create a pixel puzzle etc.

Learn more about Coding Activities are:
https://brainly.com/question/25250444

What problem does computer science solve in dance?

Answers

Answer:

Computer science, your able to make websites that might have videos on teaching you dance techniques.

This is an example of what type of formula?
=(D1+D17)

Answers

The type of formula that is represented by the given example =(D1+D17) in excel is known as; The SUM Formula function

What are functions in excel?

There are different ypes of formula functions in excel such as;

SUMCOUNTCOUNTAIFTRIMMAX & MIN

Now, in this question, the formula we are given is =(D1+D17) and the example it represents is the SUM formula function.

Read more about Excel Functions at; https://brainly.com/question/14042837

Michael bought a game he will play on his computer. The scenes in the game move smoothly, but they seem a little blurry. Which two devices--either or both-might be causing the issue?

keyboard

hard

disk

monitor

mouse

graphics card


Answers

The devices that may be causing the game to appear blurry are the graphics card and the monitor.

What is a graphics card?

The graphics card is a hardware device used in computers to improve their performance when playing videos, video games or other programs that have high graphic demand.

What is a monitor?

Monitor refers to the computer screen. This can have very varied characteristics such as size, range of colors, pixels, among others that can affect the image.

According to the above, either of these two devices can alter the image of the video game, making it look much more blurred.

Learn more about computers in: https://brainly.com/question/21080395

How dose computers it use the information to solve problems

Answers

Answer:

A programmer's job is to find solutions. They break down problems into easy steps for a computer. 

Explanation:

hope I'm helping you!

Two ways of calculating average returns are ______ and ______. Multiple select question. the arithmetic average the progressive average the geometric average the common average

Answers

Answer:

"Geometric Average Return Example. Jennifer has invested $5,000 into a money market that earns 10% in year one, 6% in year two, and 2% in year three. If you were to calculate this using the arithmetic mean return, you would add the rates together and divide them by three, giving you an average of 6%."

Explanation:

A programmer ensures the user inputs valid data by setting algorithms boundaries data output

Answers

Answer:

boundries

Explanation:

i did the test so trust me its right

The proper type of data is required. Users must, for instance, enter a figure in the field labeled “Total purchase units.” There must be a limit on the data's range of values. For instance, customers can only select a legitimate loan type from a list of possibilities.

What is the input's valid data by setting algorithms?

An input validation approach is used to ensure that the data given by a user is accurate.

A software might ask for a score between 0 and 50, for instance, and employ an input validation technique to make sure that numbers below 0 and beyond 50 are rejected.

Any Value—This nullifies any previous data validation. Whole Number—Only whole numbers are permitted. You might stipulate, for instance, that the user must enter a value between 0 and 30. Decimal: The user must provide a decimal-valued number.

Therefore, boundaries programmer ensures the user inputs valid data by setting algorithms boundaries data output.

Learn more about algorithms here:

https://brainly.com/question/28283722

#SPJ5

What’s the name of the technology that lets ryzen™ 5 series cpus access the entire gddr memory of radeon™ rx gpus?.

Answers

The name of the technology that lets ryzen™ 5 series cpus access the entire gddr memory of radeon™ rx gpus is AMD Smart Access Memory.

What is AMD Smart Access Memory?

AMD Smart Access Memory is known to be a type of memory that helps AMD Ryzen processors to use all their  full power of the graphics card memory.

Conclusively, it is a memory that gives room for a person to combine a Radeon RX 6000 series GPU with the used of a Ryzen processor to make your gaming performance better.

Learn more about AMD Memory from

https://brainly.com/question/18846925

_____ is human thinking and problem-solving by a machine, including learning, reasoning, and self-correction.

Moore’s law
Moore’s law

cloud computing
cloud computing

biocomputing
biocomputing

artificial intelligence.
(Answer is artificial intelligence.)

Answers

yea, artificial intelligence :/

Answer:

It artificial intelligence / AI

Explanation:

I just took the test
EDG 2022

3) Write the example of LAN.​

Answers

Networking at home, Networking in an office, networking between two computers.

Networking in home, office. Networking in school, laboratory, university campus. Networking between two computers. Wi-Fi (When we consider wireless LAN).

In a ____ world, the routing updates carry subnet mask information and allow different masks to be used on different subnets.

Answers

In a classless world, the routing updates carry subnet mask information and allow different masks to be used on different subnets.

The state of a cpu register's content is 10001.10001 in fixed point representation. what are its content if it is represents a positive real number

Answers

The fixed point representation of the state of the cpu register is a binary number

The positive real number of the state of the cpu register is 17.53125

How to determine the positive real number?

The state of the cpu register is given as:

State = 10001.10001 in binary

To convert the number to a positive real number, we make use of the following product rule

State = 1 * 2^4 + 0 * 2^3 + 0 * 2^2 + 0 * 2^1 + 1 * 2^0 + 1 * 2^-1 + 0 * 2^-2 + 0 * 2^-3 + 0 * 2^-4 + 1 * 2^-5

Evaluate the products

State = 16 + 0 + 0 + 0 + 1 + 0.5 + 0 + 0+ 0 + 0.03125

Evaluate the sum

State = 17.53125

Hence, the positive real number of the state of the cpu register is 17.53125

Read more about fixed point representation at:

https://brainly.com/question/16612919

Screen reading for extended periods can cause___________ _____________, so the position the monitor to minimize glare and give your eyes a short break every half hour.

Answers

Screen reading for extended periods can cause a syndrome known as the computer vision syndrome

Computer vision Syndrome

What is computer vision Syndrome?

the computer syndrome is characterised by eye discomfort and fatigue, dry eye, blurry vision, and headaches, glare, etc. Uncorrected vision problems are a major cause. it is recommended to stay off the computer for at least thirty minutes to minimise the effects

Learn more about Computer vision Syndrome here:

https://brainly.com/question/8114244

HURRY IT'S URGENT
How would you create a variable named myDog and give it the value "Karel"?

options:

var myDog = "Karel":


var myDog = Karel


var myDog = "Karel";


var my Dog = "Karel"

What JavaScript function do we use to print out a message to the user?

options:

printLn()


print()


print


println();

Answers

The variable myDog and the value "Karel" are illustrations of assigning values to variable

The statement that creates the variable is (c). var myDog = "Karel";The function to print in JavaScript is (b) print()

How to create the variable?

To create a variable in JavaScript, you have to add the keyword "var".

Given that the variable name is myDog; So, we have:

var myDog

The value of the variable is "Karel".

Hence, the assignment statement is: C. var myDog = "Karel";

Function to print in JavaScript

To print in JavaScript, we make use of the print() statement

Hence, the function to print in JavaScript is (b) print()

Read more about JavaScript at:

https://brainly.com/question/16698901

what is the importance of saving a web page

Answers

Answer:

to see it later and remember it

How have you improved the technology function to provide the right services at the right price and right level of quality?

Answers

What did you do? Write that as the first part

Website where customers can ask check the ,services and products, Using e-mail to improve customer service and respond to specific needs and More advanced data-gathering techniques, such as customer relationship management software.

How can technology help in customer retention?

Deals can be sent via mobile. Customers would profit from promotions and coupons supplied to their mobile devices.

This behavior is growing more sophisticated and focused. You can send promos on products or services you know a consumer enjoys based on their purchase history.

Thus, Website, E-mail and software can improve the service quality.

For further details about technology, click here:

https://brainly.com/question/16877197

#SPJ4

data in ai uses what >

Answers

Answer:

Explanation:

artificial intelligence describes the ability of computers to act like humans

A collection of characteristics that belong to a single person, place, or thing for which data is maintained is a(n) _____

Answers

Answer:

A collection of characteristics that belong to a single person, place, or thing for which data is maintained is a(n) record.

Explanation:

A record represents a collection of attributes that describe a real-world entity.Records consist of fields, with each field describing an attribute of that entity.

B. State True or False: 1. 'Date within' option allows you to search an email within a specified date range.​

Answers

Answer + Explanation:

his topic describes the email and document properties that you can search for in email items in Exchange Online and documents stored on SharePoint and OneDrive for Business sites by using the Content Search feature in the Security & Compliance Center. You can also use the *-Compliance Search cmdlets in Security & Compliance Center PowerShell to search for these properties

Please have a great day <3

In a ________ system configuration, separate information systems are designed and managed by each foreign unit.

Answers

Answer:

In a decentralized system configuration, separate information systems are designed and managed by each foreign unit.

Explanation:

hopes this help (:

What are different social phenomenas are you aware of that used part of a social movement, change, or cause

Answers

Answer:

Social change in the broadest sense is any change in social relations. Viewed this way, social change is an ever-present phenomenon in any society.

Explanation:

Data becomes _____ when it is presented in a context so that it can answer a question or support decision makin

Answers

Data becomes Moderate when it is presented in a context so that it can answer a question or support decision making.

What Does Data Mean?

Data when interpreted in the context of databases, it is known to be the full single items or things that are known  to be stored in a database.

They can come alone as individually or as a set. Data in a database is said to be often stored in database tables, that helps to organized into columns and also dictate the data types that should be stored in it .

Learn more about data from

https://brainly.com/question/179886

How is the development of SaaS related to cloud computing?

Answers

Answer:

SaaS cloud allows it to take advantage of the efficiencies of resource pooling and cost effective pricing models of cloud- based infrastructure

Other Questions
What the 10 president Isotopes are:A. found in the nuclear reactions instars but not on Earth.B. are only theoretical.C. found in nature.D. only formed in laboratories. Choose the correct answer:The gift was designed to _______ the empires actions.A) revealB) consumeC) glorifyD) rank Question 6 of 10Which of the following are solutions to the equation below?Check all that applyx2 3x + 27 = 6x + 7A. 3B. 6C.-4D. 5E. 4 convert 0.001 * km ^ 3 into m ^ 3 Suppose you carry out a significance test of H0: = 7 versus Ha: 7 based on sample size n = 28 and obtain t = 1.45. Find the p-value for this test. What conclusion can you draw at the 5% significance level? Explain. Activity 1. Circuit DesignerDIRECTIONS: Draw the corresponding circuit diagram and symbols using the given number of components. If the diagram is given identify its components.Please answer this correctly thank you. Solve by completing the square what is c + 6c - 6 if c = 4? A circuit has a resistance of 2.5 N and is powered by a 12.0 V battery.The current in the circuit, to the nearest tenth, is what ? Which column order is known for it's leaf ornamentation surrounding a basket core capital? A. DoricB.IonicC. Corinthian please help me what organism is the secondary consumer ? There are 14 white cabbages and x purple cabbages in a box.A cabbage is selected at random.The probability of taking a white cabbage from the box is 0.56.Find the value of x. The most important supplier that a meetings and special events planner works with is caterers.O TrueO False 7. Assume this policy has a deductible of $1,000 and a coverage limit of$15,000. If tirere are personal property losses of $7,000 for a coveredevent, which best describes how much both parties pay?* Ann's car can go 288 miles on 8 gallons of gas. During a drive last weekend, ann used 5 gallons of gas. How far did she drive? PLEASE HELP!!! An athletic banquet charges a fixed fee of $500 plus $25 per person for the food. There are up to 50 guests, how much would the banquet cost for 45 and 90 guests? What is the rate of change? molly makes 70% of her free throws. The random numbers below represent 20 trials of a simulator of two free throws, using the numbers 9 through 0 38 38 21 50 6471 66 42 47 9080 82 29 98 27 87 89 89 93 03let the numbers from --- to ----- represent a successful free throw.let the numbers from ---- to ----- represent a missed free throw.based on the simulated results, the probability that molly makes both free throws is----- or ------% what is the inequality shown The use of a conceit in lines 12-14 (Let . . . one) allows the speaker to focus on a complex comparison betweenA. Being acquisitive and being satisfied with what one already hasB. young lovers and world explorersC. those who study maps and those who explore the seasD. remote, exotic locations and local scenes of pastoral lifeE. the public world and a private world shared by the lovers