1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vlabodo [156]
2 years ago
9

Finish the code to search for a 7 in the array.

Computers and Technology
1 answer:
guapka [62]2 years ago
8 0

Answer:

The complete code is as follows:

from array import *

myArr = array('f',[3, 5, 7,3, 10])

location = myArr.index(7)

print(str("7")+" is at position "+str(location+1))

Explanation:

I made corrections to the third line of the code and I added a line

This line gets the index of 7 from the array myArr using the index keyword

location = myArr.index(7)

This line prints the position of the 7 in the array

print(str("7")+" is at position "+str(location+1))

You might be interested in
Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are giv
Alexus [3.1K]

<u>Answer:</u>

I am writing <em>partial code in</em> <em>c++ to calculate weighted average</em>. The weighted average should be calculated based on multiplying the test score and its <em>respective weight and finally add all the test score.</em>

<u>Explanation:</u>

<em>int arrtestscore[100];</em>

<em>int arrweight[100];</em>

<em>int n;</em>

<em>double weightedavg;</em>

<em>cout<<”Enter the number of test score for which weighted average needs to be calculated”;</em>

<em>cin>>n;</em>

<em>for(int x = 0; x <n;x++)</em>

<em>{</em>

<em> cout<<”Enter test score :” + (x+1) ;</em>

<em> cin>>arrtestscore[x];</em>

<em> count<<”Enter the respective weight:”;</em>

<em> cin>>arrweight[x];</em>

<em>}</em>

<em>for (int i=0; i<n;i++)</em>

<em>{</em>

<em> weightedavg = weightedavg + (arrtestscore[i] * arrweight[i])</em>

<em>}</em>

<em>cout<<”weighted average = “ <<weightedavg; </em>

3 0
2 years ago
HELP 99PTS If Answered
Alborosie

You will have to do this as we are not you and we do not know local business/websites. Sorry we could not help.

3 0
3 years ago
Read 2 more answers
Allowing every communication is a bad idea from a security standpoint as well as a productivity one.TrueFalse
s344n2d4d5 [400]

Answer:

The answer to this question is True.

Explanation:

If we allow every communication this will not be a great idea if we want better security and better productivity.

There will be a lot of spam communications so the productivity and the security will also degrade because of that.

So if we want better productivity and security we have to allow a certain number of connections.

Hence the answer to this question is True.

4 0
3 years ago
Ping pc-b from a command prompt window on pc-a. were the pings successful? why?
love history [14]
If the pings are successful you are either on the same subnet and everything is configured correctly or ICMP echo is enabled on the router which it should be by default internally. Externally, ICMP can/should be disabled to avoid DOS attacks.
7 0
3 years ago
Flodding on rivers is caused by human activity rather than natural events true or false
ValentinkaMS [17]

Answer:

True

Explanation:

While I believe it's a compendium of the both(both true and false), I when asked to pick just one, I would go with yes. They're are lots of things we humans do on a general note that causes flooding. Although, heavy rainfall can also cause flooding and that's not as a result of human activity, but directly. But then, activities like not maintaining a dam, or erecting a structurally failed dam can cause flood to occur at any point in time, without warning even. Another way is when due to our activities, we block the rivers, this can also lead to flooding exactly like the case of heavy rainfall does. Lack of good drainage facilities, drainage wouldn't create itself, we as humans do. When we don't were essentially creating an excuse for an eventual happening of flood.

Succinctly put, human activities also cause floods, as much as natural events causes flood.

3 0
3 years ago
Other questions:
  • Systematically tackling the threats and vulnerabilities in the seven individual domains of a typical IT infrastructure helps you
    6·1 answer
  • Two different ways to bring up My Computer folder
    11·1 answer
  • Describe the major research, discoveries, or impact Timothy Berners-Lee has made on the scientific community. 100 points for ans
    6·1 answer
  • If you were to create a new app for a smartphone or tablet that does not already exist, what would you create?
    10·1 answer
  • ________ programming is a method of writing software that centers on the actions that take place in a program.
    8·1 answer
  • True or false.local and cloud backup differs in where the backup is saved
    15·2 answers
  • Siapa mahapatih brainly.com atau yg disebut Brainly Amerika Serikat ?​
    5·1 answer
  • George works for a print newspaper in which of these areas would you be interested to hire new recruits for the newspaper WHICH
    11·1 answer
  • which program monitors the computer by looking for known trouble makers as well as suspicious behavior​
    11·1 answer
  • Who plays oblox .............................
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!