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
4013
grigory [225]

Answer:

IM YOUR DADDY

Explanation:

5 0
3 years ago
Read 2 more answers
Question 1 of 40
Novay_Z [31]

Answer:

D. Federal Work-Study

Explanation:

8 0
3 years ago
What does the % find
Sever21 [200]

Answer:

The FIND function returns the position (as a number) of one text string inside another. If there is more than one occurrence of the search string, FIND returns the position of the first occurrence. FIND does not support wildcards, and is always case-sensitive.

Explanation:

4 0
2 years ago
The CPU's control unit retrieves the next instruction in a sequence of program instructions from main memory in the ______ stage
Varvara68 [4.7K]

Answer:

A. Fetch.

Explanation:

The fetch-decode-execute process of simply the fetch-execute process of the CPU are stages the CPU follow to process information and the switch state or shutdown.

The stages of this process is implied in its name, that is, the stages are fetch, decide and execute.

The fetch stage retrieves the next instruction from the memory.

The decode stage converts the clear text instruction set to electronic signals and transfer it to the appropriate registers.

The execute stage is the action carried out in the arithmetic logic unit.

5 0
3 years ago
In Marvel Comics, what imaginary rare metal is an important natural resource of Wakanda, the home country of Black Panther?
DerKrebs [107]

Answer:

vinranium

Explanation:

i watched the movie

IM SO SMART!!!!!!!!!!!!! UWU

3 0
4 years ago
Other questions:
  • What happens to an LR if they troll/spam?
    13·1 answer
  • You speak to a business owner that is taking in almost $2,000 in revenue each month. The owner still says that they’re having tr
    7·1 answer
  • Victoria is creating a brochure for her photography studio. She designed the layout and placed a photo in the center of the page
    13·1 answer
  • Two-factor authentication can best be breached by the adversary using:________. a. social engineering attack b. using sniffers l
    10·1 answer
  • How does emotional awareness help you with non-verbal communication?
    13·2 answers
  • A(n) __________ item is a hardware or software item that is to be modified and revised throughout its life cycle
    10·1 answer
  • Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command? [BEGIN
    5·1 answer
  • Which style did Jack use on the vocabulary words in reports?
    14·2 answers
  • A company has critical systems that are hosted on an end-of-life OS. To maintain operations and mitigate potential vulnerabiliti
    14·1 answer
  • Explain in detail what this code does, Whats the flow in it, and whats the risk that its creating and what can i do to fix it? (
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!