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
Sloan [31]
3 years ago
12

2.4 Code Practice: Question 2 Write a program that accepts a number as input, and prints just the decimal portion. Example: Ente

r a number: 15.789 Output: 0.789 Hint: Make sure to account for negative numbers!
Computers and Technology
1 answer:
vfiekz [6]3 years ago
6 0

Answer:

Explanation:

Let's code it using python. We can take care of the negative number by placing an absolute function at the end. Basically the decimal part is calculated by subtracting the integer part from the original input number

def decimal_print(number):

    int_part = int(number)

    decimal_part = number - int_part

    return abs(decimal_part)

You might be interested in
Tamika has received an average of 97% on all of her math tests, has done well on her homework assignments, and participates in c
sashaice [31]

Answer:

B is the correct answer.

6 0
3 years ago
Read 2 more answers
What is the fifth and final stage in the process of media production
Mama L [17]

edit is the 5th and distribute is the final stage in process of media production


6 0
3 years ago
What is an undirected graph?
ella [17]

Answer: An undirected graph is the graph that has the connection of the objects in the form of bidirectional edges.This graph is formed for by the attachment of the collection of the objects which get displayed in the form of network and thus, also known as the undirected graph.

The graph is formed by the nodes or objects getting connected and form edges or link(which is typically in the form of line).

.

5 0
3 years ago
Consider the following list. list = {24, 20, 10, 75, 70, 18, 60, 35} Suppose that list is sorted using the selection sort algori
Nadya [2.5K]

Answer:

list =  {10, 18, 24, 75, 70, 20, 60, 35}

Explanation:

Selection is a sorting algorithm that will set a cursor position and search for a minimum number from the list. When the minimum number is found, that minimum number will be swapped with the number in the cursor position. Only one number will be swapped and sorted in one iteration of outer loop. To sort the next number in the following outer loop iteration, the cursor will be moved to the next position and repeat the same search and swapping process as in the first iteration. When finishing all the iterations of outer loop, all numbers shall be sorted in ascending order.

4 0
3 years ago
What is a segment
monitta
A length of uninterrupted cable connecting two devices
3 0
3 years ago
Other questions:
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • What websites can help you learn about general career treads
    11·1 answer
  • When you are given a set of tables and asked to create a database to store their data, the first step is to ________?
    8·1 answer
  • Can you redact this image
    15·1 answer
  • Understanding the link between education and your desired career is an integral part of your career _______.
    7·2 answers
  • A rocket always rotates about its___?
    9·2 answers
  • A good sentence about art
    9·1 answer
  • What steps should be taken to dispose of and recycle plastic?
    14·1 answer
  • Which for loop syntax is correct?
    5·1 answer
  • Given a list of syntax errors from a compiler, a programmer should focus attention on which error(s), before recompiling?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!