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
tamaranim1 [39]
3 years ago
10

Write a program to prompt the user for a positive integer: N. The program will repeatedly divide the input in half using a loop,

discarding any fractional part, until it becomes 1. The program should print on separate lines:
• the sequence of ‘halved’ value, one per line
• the number of iterations required
• the value of log2(N)
Computers and Technology
1 answer:
a_sh-v [17]3 years ago
5 0

Answer:

using python to write the program

Explanation:

#To use the log function, the module must be imported

import math

n=int(input("Enter number to be halved"))

count=0

while(n>1):

   count=count+1

   n=n//2

print("The number halved is now ", n, "The is the ", count, "iteration")

x = math,log(2,(n))

print("The log of n is:", x)

You might be interested in
Discuss the core technologies and provide examples of where they exist in society. Discuss how the core technologies are part of
Vika [28.1K]

Answer:

Part A

The core technologies are the technologies which make other technologies work or perform their desired tasks

Examples of core technologies and where they exist are;

Thermal technology, which is the technology involving the work production, storage, and transfer using heat energy, exists in our refrigerators, heat engine, and boilers

Electronic technology is the technology that involves the control of the flow of electrons in a circuit through rectification and amplification provided by active devices. Electronic technology can be located in a radio receiver, printed circuit boards (PCB), and mobile phone

Fluid technology is the use of fluid to transmit a force, provide mechanical advantage, and generate power. Fluid technologies can be found in brakes, automatic transmission systems, landing gears, servomechanisms, and pneumatic tools such as syringes

Part B

The core technologies are the subsystems within the larger systems that make the larger systems to work

The thermal technology in a refrigerator makes use of the transfer of heat from a cold region, inside the fridge, to region of higher temperature, by the  use of heat exchange and the properties of the coolant when subjected to different amount of compression and expansion

The electronic technologies make it possible to make portable electronic devises such as the mobile phones by the use miniaturized circuit boards that perform several functions and are integrated into a small piece of semiconductor material

Fluid technologies in landing gears provide reliable activation of the undercarriage at all times in almost all conditions such that the landing gears can be activated mechanically without the need for other source of energy

Explanation:

6 0
3 years ago
Julie has a difficult time seeing her computer Screen and uses adaplive technology tools to help he see better. One of the tools
andreyandreev [35.5K]

Answer:

200%

Explanation:

While Julie has some difficulties reading short words, she can zoom the size of the texts by two hundred percent to make the process faster. A hundred percent or less would have much more difficulty reading short words.

4 0
3 years ago
Read 2 more answers
What is the output of this program?
Leto [7]

Answer:

70 is the answer negative one begins from 83 and count down to 89, Therefore, 70 is is -4 and is chosen as the best answer

7 0
3 years ago
Select the steps for adding artwork into a placeholder on a presentation slide. A. Select art from the tools menu. B. Double-cli
mojhsa [17]

Answer:

Double-click on the placeholder.

Navigate to and select the file you want.

5 0
4 years ago
Read 2 more answers
A computer network is best described as two or more computers that are
ANTONII [103]
A computer network is best described as two or more computers that are linked together. 
6 0
3 years ago
Other questions:
  • This solution will use an item quantity and a state code to calculate the total price of an item. The solution will calculate th
    10·1 answer
  • This provides an easy method for workers to use their computers.
    5·1 answer
  • Bullet points on a slide should be limited to _____. 2 4 8 10
    15·2 answers
  • Who invented the first RAM stick
    11·1 answer
  • Which of these consoles have 64 bit architecture
    13·1 answer
  • Select the correct answer,
    12·1 answer
  • What is the purpose of the New Window command?
    7·2 answers
  • How can data be calculated?
    14·2 answers
  • ____coping skills are instinctive.<br> A. All<br> B. No<br> C. Some
    9·1 answer
  • To input lenth in meter and convert in to centimeter​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!