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
A(n) __________ is a recording of a motion picture, or television program for playing through a television.
lisabon 2012 [21]
A video is a recording of a motion, or television program for playing through a television. A camcorder is a device or gadget that is used to record a video. audio is the sounds that we hear and mix media is a tool used to edit the video.
3 0
3 years ago
Read 2 more answers
The three logical operators recognized by most search engines are
Kisachek [45]
The three basic logical operators recognized by the most search engines are AND, OR and NOT. They are known as Boolean operators. <span>You can use Boolean operators in keywords on the internet in both advanced and customs searches on many search engines.</span>




8 0
4 years ago
You can make a table in presentation software?<br> A. <br> FALSE<br> B. <br> TRUE
Serggg [28]
[B] True.

In something like Microsoft Publisher, you are able to go to Insert -> Table, and specify the dimensions for the table you want.
8 0
3 years ago
A key principle of human-computer interaction (HCI), that states that the appearance of any control should suggest its functiona
kaheart [24]

Answer:

"Affordance" is the correct answer.

Explanation:

  • The performance or properties of such an entity that determines its possible applications which makes it abundantly clear how everything could and should always be used people are sitting or standing on something like a chair as it is very apparent.
  • Users are allowed to experience conceptions without thinking about how to make use of other objects.
4 0
3 years ago
If a stop-and-wait protocol is used, what is the fraction of time, in seconds, that the sender is busy sending bits into the cha
olganol [36]

Answer:

This question is incomplete, here is the complete question;

If a stop-and-wait protocol is used, what is the fraction of time, in seconds, that the sender is busy sending bits into the channel (the utilization), given that the round-trip-time (RTT) for a router is 20ms when sending 2000 Byte packets ( a byte is 8 bits) at 500Mega bits per second (Mbps)? Answer to the nearest tenth of a microsecond. Recall that the formula for utilization U is L/R / (L/R + RTT). Be careful of your units. Provide the answer in microseconds with one decimal place. Do not label your answer with the units, just provide the number .

Explanation:

The Answer to the question is given with proper step by step solution.

Given that : the round-trip-time (RTT in abbreviation) = 20ms = 0.02 micro seconds

L = 2000

Byte = 2000*8

bits = 16000 bits

R = 500Mbps = 500*106 bps

Now,calculate L/R = 16000 / 500*106

= 32 / 106

= 32 micro seconds

The Utilization (U) = fraction when the time sender is busy sending

= (L/R) / (L/R + RTT)

= (32) / (32 + 0.02)

= 32 / 32.02

= 0.99937539 seconds

= 999375.39 micro seconds

= 999375.4 (nearest tenth)

5 0
3 years ago
Other questions:
  • In asps, the code to tie the database to the web site is typically written in javascript or ____.
    15·1 answer
  • Which category of app does word processing software fall into? A. Productivity B. Entertainment C. Social networking D. Educatio
    14·2 answers
  • In the processes tab of task manager, the ____ tab displays the âworking setâ of a process, or the amount of memory it is active
    12·1 answer
  • How people have contributed to the advancement of science
    7·1 answer
  • Digital printing is not suitable for printing what
    11·1 answer
  • For this exercise, you are going to create a part of an Animal hierarchy. Unlike some of our examples and the previous exercises
    10·1 answer
  • I just wanna know how many times a day y'all hit the tutor button at the bottom
    10·2 answers
  • A program has a infinite while loop. How can you interrupt it?
    7·1 answer
  • How have you improved the technology function to provide the right services at the right price and right level of quality?
    7·1 answer
  • What option can be used by a system administrator to ensure that dynamic updates are made only by known clients when you have a
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!