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
MAVERICK [17]
3 years ago
13

Lesson 2.7 Code Practice #2

Computers and Technology
1 answer:
scoundrel [369]3 years ago
5 0

Answer:

no se ve unu ........unu

You might be interested in
You are building a network and need to connect five computers in an office. They will be on the same network segment and you sho
lilavasa [31]

Answer:

a lan party

Explanation:

because it's your personal party

4 0
4 years ago
Write a function called st_dev. St_dev should have one #parameter, a filename. The file will contain one integer on #each line.
kodGreya [7K]

Answer:

  1. import statistics
  2. def st_dev(file_name):
  3.    with open(file_name) as file:
  4.        data = file.readlines()
  5.        numList = []
  6.        for x in data:
  7.            numList.append(int(x))
  8.        
  9.        return statistics.pstdev(numList)
  10. print(st_dev("text1.txt"))

Explanation:

The solution code is written using Python.

To ease the calculation task, we can import Python statistics module to use the pstdev method to calculate the population standard deviation of a list of numbers (Line 1).

Next, create a st_dev function that take single argument file_name (Line 3). In the function, it will open the input file and read the data line by line (Line 4-5). Create a for loop to traverse through each line of the data which is an integer and append it to numList (Line 7-8). We can pass the numList to pstdev method (Line 10) and return the resulting standard deviation value as output.

We test the function by passing a file which hold a list of integer values in each line (Line 12).

8

9

12

11

21

15

16

10

7

13

And the output we shall get is 4.019950248448356

6 0
4 years ago
The Sieve of Eratosthenes is an elegant algorithm for finding all the prime numbers up to some limit n. The basic idea is to fir
IRISSAK [1]

Answer:

Check the explanation

Explanation:

#!usr/bin/python

#FileName: sieve_once_again.py

#Python Version: 2.6.2

#Author: Rahul Raj

#Sat May 15 11:41:21 2010 IST

 

fi=0 #flag index for scaling with big numbers..

n=input('Prime Number(>2) Upto:')

s=range(3,n,2)

def next_non_zero():

"To find the first non zero element of the list s"

global fi,s

while True:

if s[fi]:return s[fi]

fi+=1

def sieve():

primelist=[2]

limit=(s[-1]-3)/2

largest=s[-1]

while True:

m=next_non_zero()

fi=s.index(m)

if m**2>largest:

primelist+=[prime for prime in s if prime] #appending rest of the non zero numbers

break

ind=(m*(m-1)/2)+s.index(m)

primelist.append(m)

while ind<=limit:

s[ind]=0

ind+=m

s[s.index(m)]=0

#print primelist

print 'Number of Primes upto %d: %d'%(n,len(primelist))

if __name__=='__main__':

sieve()

4 0
3 years ago
__________ delivers a comprehensive and accurate graphical overview of key performance indicators, often using a single screen.
Irina18 [472]
The answer is a digital dashboard.

In its simplest form, a digital dashboard or a business dashboard provides a graphical representation of KPIs, measures and metrics used by a company to monitor performance of departments, individuals, teams or the entire company. They track the progress of business objectives and make effective data driven decisions.



6 0
4 years ago
PLEASE HELP! In the evolution of the internet, which event occurred most recently?
Pani-rosa [81]
Just took the quiz and Do is the correct answer.
5 0
3 years ago
Other questions:
  • Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day's sc
    6·1 answer
  • True or False, PDF documents have many benefits, but their main disadvantage is that the formatting of their text and graphic el
    15·1 answer
  • A network administrator was told by the Chief Information Officer (CIO) to set up a new office with a network that has redundanc
    7·1 answer
  • When a business is using methods that help it use its time and resources the best they can, what are they exercising?
    11·2 answers
  • You learned that properly edited resumes are necessary for making a good impression on a university or a potential employer. Dis
    13·1 answer
  • Which activity represents a violation of the licensing agreement?
    13·2 answers
  • An information system interacts with its environment by: A. processing data. B. XML protocols. C. receiving data. D. systems ana
    10·1 answer
  • Anyone else having problems with edg?
    9·1 answer
  • What year did polaroid introduce one-step photography with the SX-70
    14·1 answer
  • What subnet mask can be used to segment the 172.16.0.0 network to allow for a minimum of 6 subnets while maximizing the number o
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!