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
The network services and facilities that users interact with are provided by
docker41 [41]
<span>The network services and facilities that users interact with are provided by authentication.</span>
6 0
3 years ago
Peter has recently bought a media player and a digital camera. He wants to buy a memory card for these devices. Which memory dev
lianna [129]

The answer is a Flash drive or better, an SD card

An SD card is a non-volatile memory use mostly in portable devices such as cameras, phones and other mobile solutions like tablets. They are capable of being a life in certain situations. They store all your documents, pictures, and photos in rows of tiny memory chips. In general, most modern consumer cameras use either Compact Flash or SD cards.


8 0
3 years ago
Read 2 more answers
A. True <br><br> b. False: most modern computers can understand and execute pseudocode.
Veronika [31]
False






---------------------------------------------
7 0
3 years ago
Help wat does ctrl+u means
Anastasy [175]

Answer:

crtl+u is a shortcut.

Explanation:

Microsoft Windows/KDE/GNOME:

underline

Unix (command line and programs using readline):

Cut text between beginning of line and cursor

3 0
3 years ago
Which are factors that go into a project plan?
BaLLatris [955]

Answer:

The four critical factors to planning a successful project

Explanation:

5 0
3 years ago
Other questions:
  • State The function<br>of floppy disk​
    10·1 answer
  • Convert the following 8­bit binary numbers in two's complement format to decimal (If the number is negative, include the minus s
    5·1 answer
  • Which of the following statements isNOT true about abstract data types (ADTs)?A list is anexample of an ADT.ADTs hide theimpleme
    7·1 answer
  • What does it mean to say that a graph is complete?
    14·1 answer
  • WhAt is a jpeg do i look like i know what a jpeg is
    13·1 answer
  • Why computer is known as versatile and diligent device? Explain​
    7·1 answer
  • Which of the following describe ALAC audio files? Choose all that apply.
    5·2 answers
  • Guys how can i video my self from my laptop <br> my laptop is (lenovo)
    8·2 answers
  • What is a shortcut for adding a timeline marker
    14·2 answers
  • Identify an internal user who uses product lifecycle management (plm) software and its data.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!