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 authentication protocol is ticket-based and is used by windows computers that are members of an active directory domain?
Temka [501]
Your IP address, also known as Internet Protocol
7 0
3 years ago
Employees don't have to comply with PPE requirements if they feel the PPE isn't necessary for the particular task they performed
ANTONII [103]
You know what...ITS IS VERY VERY FREAKIN FALSE!!
7 0
3 years ago
Read 2 more answers
Halp Computer Science
AleksandrR [38]

1st one: is memory

2nd one: is 8

8 0
3 years ago
Read 2 more answers
Which code snippet could be used to print the following series?
GaryK [48]
C is the answer, I think
7 0
1 year ago
HURRY PLEASE ITS A TEST
laiz [17]

<em>A.)</em>

<em>It's either A or D both of them stand out and make sense to me so I think that it'll be right if you choose A or D.</em>

<em>-Ɽ3₮Ɽ0 Ⱬ3Ɽ0</em>

8 0
3 years ago
Other questions:
  • What is process equipment?
    12·1 answer
  • What are the features of a strong résumé? Check all that apply. The résumé is printed on regular printer paper. The résumé is we
    5·2 answers
  • A large IPv4 datagram is fragmented into 4 fragments at router 1 to pass over a network with an MTU of 1500 bytes. Assume each f
    15·1 answer
  • The domain name service (dns is a distributed database that allows users to communicate with each other computers by:
    7·1 answer
  • What is information technology
    11·1 answer
  • Chapter 15 Problem 6 PREVENTIVE CONTROLS Listed here are five scenarios. For each scenario, discuss the possible damages that ca
    11·1 answer
  • Someone gave me flashcards on a keychan. I have to memorize them and then give them back. Can I back them up to my PC by creatin
    5·1 answer
  • What is Data rate?<br> What is BAUD RATE?<br> What is bandwidth?
    8·1 answer
  • What’s cloud-based LinkedIn automation?
    14·1 answer
  • Write l for law of enrtia,ll for law of Acceleration and lll for law of enteraction.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!