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
Which statement is true regarding Artificial Intelligence (AI)?
Effectus [21]
Data is the fundamental reason AI succeeds or fails.
This statement is true regarding Artificial Intelligence (AI)
6 0
3 years ago
Help meeeeeeeeeeeeeee please​
bija089 [108]

Answer:

Explanation:My explanation is above my comment :)

3 0
3 years ago
Ted wants to share some information with his team. Match the levels of information with the content of the information that Matt
myrzilka [38]

The  Match up of the levels of information with the content of the information that Matt has shared are:

The nice to know - Ted makes an announcement of the total annual profit of the company.

The  should know - Ted gives his team a brief of the email etiquette for them to follow.

The  must know - Ted informs his team about the office work hours and dress code.

<h3>What do you mean by information?</h3>

Information is known to be data or any form of stimuli that connote a given meaning in some context to its receiver.

Hence, The  Match up of the levels of information with the content of the information that Matt has shared are:

The nice to know - Ted makes an announcement of the total annual profit of the company.

The  should know - Ted gives his team a brief of the email etiquette for them to follow.

The  must know - Ted informs his team about the office work hours and dress code.

Learn more about information from

brainly.com/question/4231278

#SPJ1

6 0
2 years ago
Please please help I don’t understand this
garik1379 [7]

Answer:

It is this because yass

Explanation:

And yes

6 0
3 years ago
Read 2 more answers
Put the following events from computer history in the order they happened:
kykrilka [37]
Show us a picture so we can answer
7 0
3 years ago
Other questions:
  • To download a webpage, the web browser copies files and transfer them to your ____
    14·2 answers
  • What is malware short for?
    13·2 answers
  • What is not a common purpose for a research report?
    5·2 answers
  • When Creating a game ( Which I Am, FPS ofc ) what are the basic rules would you want to add
    14·1 answer
  • Write a program that declares a constant named QUARTS_IN_GALLON which holds the number of quarts in a gallon (4). Also declare a
    8·1 answer
  • What is the meaning of photography​
    5·2 answers
  • A desktop computer is a type of mobile device.<br><br> a. true<br> b. false
    5·1 answer
  • A large number of genetic codes are stored as binary values in a list. Which one of the following conditions must be true in ord
    5·2 answers
  • Es el conjunto de manifestaciones materiales, intelectuales y espirituales que distinguen a un pueblo a)Civilización b)Cultura c
    6·1 answer
  • What is another word for: a location in memory that contains a value? A. integer B. Boolean C. variable D. float PLEASE HELP URG
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!