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
ch4aika [34]
3 years ago
13

Write a program that takes a decimal number from the user and then prints the integer part and the decimal part separately. For

example, if the user enters 2.718, the program prints: Integer part = 2 and decimal part = .718 in python
Computers and Technology
1 answer:
svp [43]3 years ago
7 0

Answer:

Explanation:

The following was coded in Python as requested. It is a function that takes in a number as a parameter. It then uses the Python built-in math class as well as the modf() method to split the whole number and the decimal, these are saved in two variables called frac and whole. These variables are printed at the end of the program. The program has been tested and the output can be seen below.

import math

def seperateInt(number):

   frac, whole = math.modf(number)

   print("Whole number: " + str(math.floor(whole)))

   print("Decimals number: " + str(frac))

You might be interested in
Nancy would like to configure an automatic response for all emails received while she is out of the office tomorrow, during busi
Stella [2.4K]

she can appoints someone she trust to act on her behalf

4 0
3 years ago
Read 2 more answers
There is overlap in the subjects of study in the different information technology disciplines. true or false
OlgaM077 [116]

The question statement is true that there is overlap in the subject of study in different information technology discipline.

It is true that there is overlap in the subjects of study in the different information technology disciplines. The disciplines are collectively known as the disciplines of computing. Computer science, computer engineering, information technology, information systems, and software engineering all come in the realm of computing disciplines. These are the five distinct computing disciplines with overlapping subjects of study.

These disciplines are said to be interrelated as computing is their main area of study, yet they are distinct since each has its own curricular focus, research perspective and career prospects.

  • Computer science: Computer science as the discipline deals with designing and implementation of operating systems and software, including the study of computation and computability.
  • Computer engineering: As a discipline, computer engineering concerns with making different parts of computers work together. Research, design and development of computer-based equipment and hardware are also area of study in this discipline.
  • Information technology: Information technology as an area of study is mainly concerned with automation of business operations. It provides support through software and computers to handle data and innovate business processes.
  • Information systems: Information system as a discipline provides area of study which makes people able to apply advance information technology to solve today’s problem primarily within an organizational and enterprise settings.
  • Software engineering:  Software engineering is the discipline concerns with the designing, development, maintenance, testing, and evaluation of computer software and applications to solve real world problems.

You can learn more about information technology at

brainly.com/question/14688347

#SPJ4

7 0
1 year ago
What is targets net worth in 2020 (i will see if you put in 2019)
Schach [20]

Answer:

62.6 billion

Explanation:

3 0
3 years ago
Which terms means device that converts one voltage to another ?
Jet001 [13]

Answer:

I believe it is an adapter

Explanation:

An adapter or adaptor is a device that converts attributes of one electrical device or system to those of an otherwise incompatible device or system. Some modify power or signal attributes, while others merely adapt the physical form of one connector to another.

6 0
2 years ago
Guys im getting the ps5 tomorrow :)​
Paha777 [63]

Answer:

lucky mf

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • As the driver it is not your responsibility that you are focused on the driving task with any possible distractions minimized. T
    9·2 answers
  • When you first open office calc, the most recently saved spreadsheet opens up. A) true B) false
    14·1 answer
  • An iframe is an inline table for a website. True False i need an answer fast
    15·1 answer
  • Why should you need to have skills and an understanding about programming?
    8·1 answer
  • Please answer this a due tomorrow!!!
    5·1 answer
  • If you're unsure if something
    9·2 answers
  • Match letters from column B to Column A by looking at the picture above.
    11·1 answer
  • Which of the following is the best definition of a computer code? a secret language a mathematical language a language that comp
    10·2 answers
  • What is Error Code: 232011
    11·2 answers
  • A new president has been elected. She promises to lower taxes drastically. What is most LIKELY to happen as a result of this dec
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!