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
Ivahew [28]
3 years ago
12

Write a program to solve the selection problem. Let k = N/2. Draw a table showing the running time of your program for various v

alues of N.
Computers and Technology
1 answer:
Brums [2.3K]3 years ago
4 0
So here is the code in Python:

n = 0.00 #this is a float because there are some numbers that are decimals.

while n < 20: #n which is 0.00 and while it is lower than 20 if runs the code below
n = n + 1 #it will add 1 to n everything it runs the code.
k = n / 2 #it will divide whatever n is everytime by 2
print(str(n) + '/2: ') # it's printing the number it's on
print(k) # prints the answer for the n.

You can change n to add by any, make n any num instead of 0.00 and you can change the while condition from n < 20 to any other logical statement. If you want to get creative you can take 2 inputs for numbers and make one of them the starting number and other one is the ending number. Also make sure to make n a number lower than you starting point because if you set n as your starting point then it will skip it.

You might be interested in
Citing the recent increase in earnings by several computer companies, economists feel that a cycle has begun in which personal c
VashaNatasha [74]

Answer:

A) a cycle has begun in which personal computer users

Explanation:

Option A as already used in the question fits and and completes the question correctly, this is because the because the writter is trying to communicate a new 'era', 'dispensention', 'period' or 'season'.... this is appropriately communicated with the word 'cycle'.

5 0
3 years ago
Which extension is appropriate for Word document templates?
Ronch [10]

Answer:

<em><u>DOCX pretty sure</u></em>

<em><u /></em>

<em><u>hope that this helps :)</u></em>

<em></em>

5 0
3 years ago
Read 2 more answers
A user's computer will not boot. A technician notices four indicator lights on the backside of the
vaieri [72.5K]

Answer:

B.

Explanation:

Computer manual is the user guide that comes along with the computer set to inform the users about the functions, ways to assemble the parts, and so on.

The user manual consists of guide for the users specially for electronic products such as computers, refrigerators; softwares, and so on. These manuals are written by technical writers, programmers, etc.

<u>In the given scenario the technician needs to refer to computer manual to know the meaning of the lights on the backside of the computer.</u>

So, the correct answer is option B.

6 0
3 years ago
Is regular Facebook use healthy? Why or why not?
melamori03 [73]
No. social media makes people share too much information about their personal lives.
7 0
4 years ago
Read 2 more answers
3. A vulnerability is: a. A hacker searching for open ports b. A known attack method c. An incorrectly implemented policy d. All
ELEN [110]

Answer:

A

Explanation:

A hacker searching for open ports denotes vulnerability of computer (to hacking).

Cheers

7 0
3 years ago
Other questions:
  • Where is the insert function button found in microsoft excel?
    11·1 answer
  • Security awareness training can reduce the risk of a data breach by what percentage?
    12·1 answer
  • A forensic investigator at a crime lab is performing a forensic analysis of a hard drive that was brought in by state troopers.
    10·1 answer
  • Assuming the Direct Hashing function and the Subtraction preprocessing algorithm is used to map keys into indices, give the inde
    15·1 answer
  • What factor(s) should be considered when determining whether a business is too far based on the query and the user location? Sel
    10·1 answer
  • What are the differences between tkinter toolkit and PyQt?
    14·1 answer
  • Hi everyone,
    6·1 answer
  • A network administrator determines who may access network resources by assigning users
    10·1 answer
  • Life without internet points
    7·2 answers
  • STM-1 contains 63 primary 2-Mbps data streams and each of them contains 30 time slots for speech.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!