9.4 Code Practice: Your task is to determine whether each item in the array above is divisible

by 3 or not. If an item is divisible by 3, then leave that value as-is in the

array, but if it is not divisible by 3, then replace that value in the array with a

o. Remember that you will need to use modular division from Unit 2 to

determine if a value is divisible by 3. Finally, print out the array in the

format as seen in the sample run below.

(Can someone please help me?)

Answers

Answer 1

Answer:

Explanation:

The following Python code is a function that takes in an array as a parameter, it then loops through the array determining if the element is divisible by 3. If it is it leaves it alone, otherwise it changes it to a 0. Then ouputs the array. A test case is shown in the attached image below using a sample array.

def divisible_by_three(array):

   for x in array:

       if x % 3 == 0:

           pass

       else:

           array[array.index(x)] = 0

   return array

9.4 Code Practice: Your Task Is To Determine Whether Each Item In The Array Above Is Divisibleby 3 Or
Answer 2

In this exercise we have to use the knowledge of computational language in python to describe the code, like this:

We can find the code in the attached image.

What is an array for?

After wondering what an array is, you might wonder what it's for. The main purpose is to store information in an orderly way, that is, for each line, one piece of information. An example of an array is when storing names of people present in a classroom.

The code can be written more simply as:

def divisible_by_three(array):

  for x in array:

      if x % 3 == 0:

          pass

      else:

          array[array.index(x)] = 0

  return array

See more about python at brainly.com/question/26104476

9.4 Code Practice: Your Task Is To Determine Whether Each Item In The Array Above Is Divisibleby 3 Or

Related Questions

Which field can be used to track the progress on tasks that a user has created? A. A. Subject
B. Start Date
C. Due Date
D. % Complete

Answers

The answer is D complete I believe

what did Bakers wear (1) in the Portugal does (2) when was author was young ???

Please don't post invalid answer please..!!​


Anyone active here please give me answer of that question..!!

Answers

(i) The dress that the bakers used to wear in Portugal was; a a single-piece long frock that reached to their knees called ''Kabai''.

(ii) The dress that the bakers used to wear when the author was young was; shirts and trousers that were shorter than the ones of full length but longer than half-pants.

This question is from the title "Glimpses of India" which is a story about a baker from Goa that is related to the period/time when the Portuguese were ruling in Goa. The story is simply a chronicles of one of the bakers that was residing in a Goan village.

i) Now, according to his story, it was clear that the cloth that was synonymous with the bakers was a single piece frock that reached their knees and this dress was called "Kabai"

ii) When the author was young he reported that the dresses then among the bakers were shirts and trousers that were quite shorter than the ones of full length but longer than the half-pants.

Read more on glimpses of india at; https://brainly.com/question/9566788

E-banking is also called: [1]
1) Online banking
2) Internet banking
3) Both a and b
4) None of these​

Answers

answer 1 it’s online banking

Sarah needs help with a presentation that she is giving the next day. What are the best ways for her to share her work to get immediate feedback? Check all that apply. with editing rights via email as a PDF file through OneDrive with read-only options via email with editing rights through OneDrive as a Word document through Office365 with commenting rights through Office365 with PowerPoint Online comment accessibility

Answers

Answer:

Office365 with PowerPoint Online comment accessibility.

The best method for her to share her work to get immediate feedback?

With editing rights through one drive. With commenting rights through Office365.With PowerPoint comment accessibility.What is the Feedback?

Feedback is known to be or occurs if outputs of a system are said to be routed back or if a person wants a response to a sent message.

Therefore, in the case above, The best method for her to share her work to get immediate feedback?

With editing rights through one drive. With commenting rights through Office365.With PowerPoint comment accessibility.

Learn more about feedback from

https://brainly.com/question/25653772

#SPJ6

30 POINTS PLS HELP AND DONT PUT ANYTHING IF U DK PLS

Explain what might have gone wrong in the following situation:

Sandra is putting together a new computer and network out of used parts. She has sufficient parts that should work together—NIC card,
cables, hub, etc.—and all of them are functional by themselves, but somehow her computer is not successfully able to connect to the
network. What might be going wrong

Answers

Answer:

The issues that may be wrong are;

1) Improper connections

2) The drivers for the Network Interface Card, NIC card is not properly configured, installed, or missing

3) Reset the network settings

4) IPv6and ipv4 Compatibility

5) Other IP related IP issue

Explanation:

From the question, we have that Sandra has the required used and functional hardware for putting a new computer and a network together but her computer is not successfully able to connect to the network, which may be due to the following reasons;

1) Improper connections

Ensure that the connections are properly made and that the network cables are straight through when connected to a network or hub or crossover cables when connected directly between devices used for computing

2) The drivers for the Network Interface Card, NIC card is not properly configured, installed, or missing

When the issue is due to the drivers for the NIC card, it can be resolved by uninstalling and deleting the driver software from the computer and then rebooting the computer for the operating system (Windows 10 etc.) to search for and install the correct drivers for the used NIC

3) Reset the network settings

When the network settings are improperly configured or configured to a setting used in another network, it can lead to not successfully being able to connect to a network

The network settings should be reset

4) IPv6and ipv4 Compatibility

Ensure that the hardware are compatible to IPv6 and/or IPv4 and adjust the settings of the network as required

5) Other IP related IP issue

An IP issue can lead to not being able to successfully connect to a network which can be resolved releasing the IP and flushing the DNS cache.

Explain why the program did not print "clap", and how to fix it.
#takes number of fingers and recommends a thoughtful response
fingers = 10
if fingers >= 2:
print("whistle")
elif fingers >= 4:
print("snap")
elif fingers >= 10:
print("clap")
else:
input("are you human?")

Answers

Answer:

Because you're using "elif".

If I were to have this code:

if *blank*:

    *action 1*

elif *blank*:

    *action 2*

If and elif is basically saying "one or the other". Since 10 is >= 2, it prints out only whistle. Instead of elif, you were to replace them all with "if", it would print out:

whistle

snap

clap

Choose the answer. Janice's IT department found that her computer had a program on it that was collecting her personal information as she browsed the Web. What is this an example of?

spyware
pharming
spam
spoofing​

Answers

Answer:

Spyware

Spam is just unwanted soliciation, spoofing is making links appear as something else, pharming is creating a fake website for victims to use.

For what two reasons is it important to add comments to a program?​

Answers

Answer: 1. They can easily understand the logic behind solving any problem 2. Comments may help you to memorize your logic that you have written while writing that code.

Which of the following is a correctly named cell?
B8
BB-8
8-B
8B

Answers

Answer:

8-B???

Explanation:

The Cell "B8" is the correct mode of depicting the spreadsheet cell.

Let understand that Spreadsheet like Ms Excel, G.oogle Spreadsheet can be be user friendly not operated with the use of Cells Rows and Columns.

The Cell Row refers to the straight boxes from the Left to Right while the Cell Column refers to straight boxes from Up to down on the Interface

Each Row and Column have a name & number attached to it. For instance, each Row have its number and each Column have its Alphabet.

In conclusion, the correct named cell out of the options is Option A which is B8 (Row B & Column 8).

Read more on this here

brainly.com/question/12961162

when receiving your bank account, you should immediately do what

Answers

Answer:

give ur account details to everyone in the world

Explanation:

Create an array of size 10 and name RandArray populate the RandArray with random integer from 1 to 20. Every element in the RandArray must be changed as follows: If the value of the element is less than the array index, the element must be replaced with the index plus 10. If the value of the element is equal to the index, the element must be doubled. If the value of the element is greater than the index, the element must be replaced by the index squared. Print the original number and the changed number of the RandArray

Answers

Answer:

int[]RandArray = new RandArray[10];

for(int x =0; x< RandArray.length;x++){

RandArray[x] = random.nextInt(10 - 1 + 1) + 1;

}

for(int x =0; x< RandArray.length;x++){

int og = RandArray[x];

if(RandArray[x]<x){

RandArray[x] = x + 10;

}

else if(RandArray[x] == x){

RandArray[x] =RandArray[x] * 2;

}

else if(RandArray[x] > x){

RandArray[x] =Math.pow(x,2);

}

System.out.println("Original: " + og +"New: "+ " RandArray[x])

}

Explanation:

Following are the python program for calculating the array values by using the random array function:

Python Program:

import random as R#import package of random

R1 = R.sample(range(1, 20), 10) #Generating 10 random numbers from 1 to 20

RandArray  = R1.copy() #Copying the elements of R1 in to RandArray

print("Original Array: ",RandArray)#defining the print method that prints RandArray value

for e in range(len(RandArray)):#defining a loop that calculates

   if(RandArray[e] < e):#defining if block that checks index of list that stores random number  

       RandArray[e] = e+10#adding 10 in numbers

   elif(RandArray[e] == e):#defining if block that checks index of list that stores random number  

       RandArray[e] = e*2#multiplying by 2 in number

   elif(RandArray[e] > e):#defining if block that checks index of list that stores random number  

       RandArray[e] = e**2#calculating the square value of RandArray

   print("Changed Array: ",RandArray)#print RandArray value

for i in range(10):#defining loop that prints Array value

   print("Original Number:",R1[i], "Changed Number:",RandArray[i])#print RandArray value

Output:

Please find the attached file.

Program Explanation:

import package of random. Defining the "R1" variable that uses a random function to generate 10 random numbers from 1 to 20.Declaring the "RandArray" that Copying the elements of R1 into RandArray.Defining a loop that calculates the length of the array and uses a conditional block that checks and calculates the random array values.In the last step, another loop is declared that prints the array "RandArray" value.

Find out more information about the random number here:

brainly.com/question/16403687

Please help me with this lab I will give brainliest . It's about binary search tree. The instructions are in the files please help me.

Answers

Is this science? Because if it is a binary tree it’s also called sorted binary it’s a rooted tree

Explain software piracy and Hacking​

Answers

Answer:

Hacking refers to attempts to gain information from otherwise undisclosed areas. Hacking is the most commonly known computer crime, however, people refer to hacking as committing any criminal act using a computer while this is not the case. ... Piracy refers to the unauthorized duplication of computer software.

Hope this helps!!

Explanation:

Answer:

SOFTWARE PIRACY is a term used to describe the act of illegal using, copying distributing software without ownership or legal rights eg: downloading movies

HACKING is an attempt to exploit a computer system or a private network inside a computer

What pc games do you all play?

Answers

Answer:

none

Explanation:

Answer:

Among us

Explanation:

What is definition about MATLAB?

Answers

Answer:

MATLAB is a high performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. Typical uses include: Math and computation.

Data analysis, exploration, and visualization.

Answer:

MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation.

Explanation:

good luck have a nice day

When is the following expression true? (2 points)
!(!a || b) || (!a && b)
1) If and only if a and b have different values
2) If and only if a and b have the same value
3)
If and only if both a and b are true
4) If and only if both a and b are false
5) The expression is never true

Answers

Answer:

1) If and only if a and b have different values

Explanation:

Given

Expression: !(!a || b) || (!a && b)

Required

When is it true?

The expression is true when the values a and b are different and the proof is as follows.

(1) Assume that: a = true and b = false

!(!a || b) || (!a && b)  

= !(!true || false) || (!true && false)

!true = false, so the expression becomes:

= !(false|| false) || (false && false)

In boolean, false|| false = false and false && false = false. So, we have:

= !(false) || (false)

!(false) = true, so, the expression becomes:

= true || (false)

Lastly, true || false = true

(2) Assume that: a = false and b = true

!(!a || b) || (!a && b)  

= !(!false|| true) || (!false && true)

!false = true, so the expression becomes:

= !(true|| true) || (true && true)

In boolean, true|| true = true and true && true = true. So, we have:

= !(true) || (true)

!(true) = false, so, the expression becomes:

= false|| true

Lastly, false || true = true

This expression is false if a and b have the same value

What is the most common option for fighting radiation?

Answers

Lead Sheets, Plates, Slabs, & Foils.

Lead Shot

Explain the Decision making statement​

Answers

Answer:

Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false.

A video project needs to be encrypted as it is going from a source to a destination. What can be added to the video

Answers

Answer:

A video encoder

Explanation:

an encoder is used to make a video encrypted so nobody can take your copy it. For instance You Tube uses an encoder

What is information cycle

Answers

Answer:

The term information cycle refers to the way information is processed and distributed and how it changes over time. It is usually used to describe the progression of media coverage relating to a particular newsworthy event or topic during which information goes through various stages of reporting and publication.

I didn’t know the answer just need to “answer” a question to get help.

what is a sending device

Answers

Answer:

A sending device that initiates an instruction to transmit data, instruction, or. information. e.g., Computer A, which sends out signals to another computer. □ A communication device that converts the data, instructions, or information. from the sending device into signals that can be carried by a.

Answer:

A sending device is an object that gives instructions to transmit information.

how will you format date so that dates appear in a format similar to 26-January-2022
Its urgent... Please tell fast​

Answers

Answer:

the format will look like this

DD-MM-YYYY

Explanation:

Explain why E-mail A is inappropriate for the workplace and revise it to be appropriate.

Answers

Email A Is Not Appropriate Because The Email Dosent Sound Professional At All Or Respectful At All

Explanation:

This is the revised Email Appropriate For Workplace

Is it possible that I will be receiving the training manual this morning because I will be needing it for my next shift.

inappropriate--workplace email uses include messages linked to social networking sites or emails involving an employee's sideline business.

Hope this Helps you!!

Ask the user to enter a sentence. If the sentence has any mention of dog, tell the user (once) Dogs are cute. If the sentence has any mention of taco, tell the user (once) Tacos are tasty. Change each mention of dog to puppy. Change each mention of taco to burrito. Print the new sentence. Capitalization matters! For example, if theres a mention of Dog (note where the capital letter is), it should be changed to Puppy (note where the capital letter is). You will only need to look for mentions of dog, Dog, taco, and Taco. The plural forms are allowed but the final output for dog / Dog will not be grammatically correct, and this is ok. See sample output.

Answers

Answer:

Theses puppies are so cute!

Theses burritos are so yummy!

Would you like a taste of this delicious taco dog?

Explanation:

there you go plz may i have a brainilist??

To excel at these professions, you need to be able to combine an eye for elegant design with a mind that delights in efficient order. In order to excel in web design, you need to combine design with ______. A web presence creative communication a complete vision an organized mind

Answers

Answer: An organized mind

Consider the graph of the function f(x) = 2(x + 3)2 + 2. Over which interval is the graph decreasing? (–∞, –3) (–∞, 2) (–3, ∞) (2, ∞)

Answers

Answer:

The interval over which the graph is decreasing is;

(-∞, -3)

Explanation:

The given function is f(x) = 2·(x + 3)² + 2

By expanding the function, we have;

2·x² + 12·x + 20

From the characteristics of a quadratic equation, we have;

The shape of a quadratic equation = A parabola

The coefficient of x² = +2 (positive), therefore the parabola opens up

The parabola has a minimum point

Points to the left of the minimum point are decreasing

The minimum point is obtained as the x-coordinate value when f'(x) = 0

∴ f'(x) = d(2·x² + 12·x + 20)/dx = 4·x + 12

At the minimum point,  f'(x) = 4·x + 12 = 0

∴ x = -12/4 = -3

Therefore;

The graph is decreasing over the interval from -infinity (-∞) to -3 which is (-∞, -3)

Please find attached the graph of the function created with Microsoft Excel

The graph is decreasing over the interval (-∞, -3).

Answer:

A. (–∞, –3)

Explanation:

Edge 2021 ( if feel still think it's wrong, check the picture ⬇️  )

Computer has brought radical change in every field​

Answers

Answer:

Yes it has brought change in every field

Explanation:

Which printing option results in a word document with images of the slides and an area to take notes

Answers

Answer:

handout is the correct answer

Explanation:

on edge

Answer:

It's C - Handout

on edge 2021

Explanation:

What types of information should have their sources cited to avoid plagiarism? List at least 3

Answers

Answer:

Everything.It doesn't matter the information because there's always a way to plagiarize.No matter what the information, always, ALWAYS, cite the source.

Explanation:

Answer:To avoid plagiarism, cite your sources for statistics, opinions, quotes, and judgments.

Explanation:

One problem with _______ is that often many copies of the same document are made.

HELPPP ​

Answers

Answer:

computer or internet is that often many copies of the same document .........

Other Questions
HELP! ITS DUE RIGHT NOW HELP How many atoms are in 25.00 g of B.1.393 x 10^24 atoms of B1.333 x 10^23 atoms of B2.16 x 10^26 atoms of B2.17 x 10^24 atoms of B Sara Sees Red ,the author compares Sara's legs to rubber . The Warren Court made decisions like Miranda v. Arizona that changed American society. These decisions confirmed all of the following rights exceptthe right to bear arms.the right to free speech.the right to privacy.the right to a court-appointed lawyer. in each of the following divide the second number by the first number and find the quotient:3/4,-3/8 At steady state, a thermodynamic cycle operating between hot and cold reservoirs at 1000 K and 500 K, respectively, receives energy by heat transfer from the hot reservoir at a rate of 1500 kW, discharges energy by heat transfer to the cold reservoir, and develops 1000 kW of power. Determine the rate of entropy production and then comment on whether this cycle is possible or impossible, and why. Find the volume of the coneAcellus What is the name of the element represented in the model?O A. BerylliumB. BoronO C. OxygenO D. Flourine how many crops are grown in arkansas? What is the sum of the interior angles of the polygon pictured below? Which of these words tells you this statement is an opinion? This newly elected leader brought a bold plan to the presidency Ms. Castillo spent $87.75 on shrimp. The shrimp cost $9.75 per pound. How many pounds of shrimp did Ms. Castillo buy? can some one help me plsss Multiple Choice Question:x2+2x-48=0 is a(n)A.) EquationB.) Expression What is the verb phrase in the following sentence? For hundreds of years, the miller family has been growing wheat in the little village of Smithville.A.The miller familyB.In the little villageC.Has been growing D. For hundreds of years What are the zero(s) of f(x + 3)? Two best friends, Thelma and Louise, are making long-range plans for a road trip vacation to Mexico. They will embark on this adventure in five years and want to invest during the five-year period to earn money for the trip. They decide to purchase a $1,000 Grand Canyon Oil Company bond with an annual coupon rate of 10 percent with interest to be paid semiannually. The bond will mature in five years. The YTM of similar bonds is 8 percent. How much should they be willing to pay for the bond if they purchase it today Write the equation of a line in point-slope form and slope intercept form GIVEN A GRAPH. Enter all answers into the answer box.Slope: ________Identify a point in the graph (x,y)_________Y-intercept: _____Equation 1: __________Equation 2: __________ Which expressions can be used to compute the approximate area of triangle XYZ? Check all that apply.Triangle X Y Z has a base of 22 and a height of 23.1. The triangle also has a base of 31.9 and a height of 15.9.One-half times 22 times 23.1One-half times 15.9 times 23.1One-half times 15.9 times 22One-half times 22 times 31.9One-half ties 15.9 times 31.9One-half times 23.1 times 31.9 PLSSS HELPPPP I WILLL GIVE YOU BRAINLIEST!!!!!! PLSSS HELPPPP I WILLL GIVE YOU BRAINLIEST!!!!!! PLSSS HELPPPP I WILLL GIVE YOU BRAINLIEST!!!!!! PLSSS HELPPPP I WILLL GIVE YOU BRAINLIEST!!!!!!PLSSS HELPPPP I WILLL GIVE YOU BRAINLIEST!!!!!! PLSSS HELPPPP I WILLL GIVE YOU BRAINLIEST!!!!!! PLSSS HELPPPP I WILLL GIVE YOU BRAINLIEST!!!!