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
What is the following file format called? inv_nbr, inv_name, inv_cost 876521,battery,45.00
kiruha [24]

The  following file format of  inv_nbr, inv_name, inv_cost is called delimited format.

<h3>What is a delimited file in Excel?</h3>

The term "Delimited" is known to be a term that connote a form of  an  TXT file that tends to make use of tabs or an  CSV file that uses commas to  be able to separate and group your data.

Note also that a  delimited file is seen as a form of a given sequential file that is made up of column delimiters.

Therefore, The  following file format of  inv_nbr, inv_name, inv_cost is called delimited format.

Learn more about text format from

brainly.com/question/16397886

#SPJ1

Multiple Choice

fixed-width format

extensible markup

delimited format

hypertext format

6 0
1 year ago
Please explain what steps you will take to prevent hackers from getting access to your personal information.
yuradex [85]
The steps I would take are 1. Making a strong password with symbols and numbers. 2. I will set up a 2 way authentication ther for if someone would be trying to hack me I would get an alert in order to stop the attempt. 3 I will not use the same password each time.
4 0
3 years ago
Help me help you............
KiRa [710]

Answer:

change how big or small the shape or sprite is

6 0
1 year ago
A network administrator is planning redundant devices and cabling in a switched network to support high availability. Which bene
a_sh-v [17]

Answer:

Redundant paths can be available without causing logical Layer 2 loops.

Explanation:

  • Spanning Tree Protocol is used to allow redundancy in the Layer 2 switched networks without creating cycles/circles also called loops.
  • These loops are called physical loops.
  • When two parts of the switched network are connected via two or more Layer 2 switches this result in a loop.
  • This affects the performance of the network as the result of broadcast packets flooding.
  • STP puts one port of the switch to forward mode and the rest of the ports within the same part of the network to the blocking mode to avoid broadcast packet flooding. STP puts all the ports that are allowing redundant paths to block mode and the one port that is left after this is placed in forward mode.
  • Spanning Tree Algorithm is used by STP to determine the optimal path  of switch to the network.
  • Bridge Protocol Data Units are used to share the information about the optimal path determined by the spanning tree algorithm with other switches.
  • This information helps STP to eliminate the redundant paths.
  • So this is how STP tracks all the links in the switched network and eliminates redundant loops by allowing only one active path to the destination while blocking all other paths.
7 0
3 years ago
If you have an if/else if/else code sequence with 4 blocks, what is the minimal number of input values that you should use to te
yawa3891 [41]

Answer:

4 is the correct answer for the above question.

Explanation:

  • If the if-else sequence has 4 blocks then it will be designed like if, else-if, else-if and then else which made 4 blocks which are as follows:-
  1. The first block is an if block.
  2. Then the second block is an else-if block.
  3. The third block is also else-if block and
  4. The fourth block else blocks.
  • So there is a need of 4 value (one value for each case) to test the application which is defined in the above scenario.
  • It is because when the first if statement is false then the first else-if statement is executed and when the first else statement is false then the second else-if statement is executed and when it is false then the else statement will executed.
7 0
3 years ago
Other questions:
  • What determines how large the crystals in an igneous rock will be?
    15·2 answers
  • Which image shows organic shapes? <br> A. image 1 <br> B. image 2 <br> C. image 3 <br> D. image 4
    14·2 answers
  • Please as soon as possible
    13·1 answer
  • One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input
    12·1 answer
  • . How is using 0 / 1 or true / false in specifying digital an abstraction?
    11·1 answer
  • Write down the bit pattern in the fraction of value 1/3 assuming a floating point format that uses Binary Coded Decimal (base 10
    10·1 answer
  • Why do certain words change color in Python?
    6·1 answer
  • Write the function evens which takes in a queue by reference and changes it to only contain the even elements. That is, if the q
    6·1 answer
  • A slide titled Alexander Graham Bell. There are 6 bulleted entries on the slide, and there is a lot of text on the slide. There
    11·2 answers
  • It is manadatory to include a banner marking at the top of the page to alert the user that cui is present.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!