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
Rock climbing fun html
Delicious77 [7]

Answer:

Ok....? Imma just fill out something more so I can get the points. ☺

5 0
3 years ago
Danielle, a help desk technician, receives a call from a client. In a panic, he explains that he was using the Internet to resea
marysya [2.9K]

Answer:

The customer's browser has been hijacked by some attackers may be.

Explanation:

According to customer's explanation there is  possibility that that his data may be stolen and he has to disconnect computer from network and then call given number in order to get back his data.

5 0
4 years ago
What is the financial aspect for a business as to what database software they will buy?
Masteriza [31]

Answer:  Database software is bought on basis of the processing, cost, requirement etc for any particular . According to the financial perspective the database  software should have the following characteristics:-

  • Database software that has most accurate and main feature according to the business requirement is selected for buying and the others with extra features are not considered as more feature cost more amount  which is not needed.
  • Database software which is still in progress to be built is pre-booked and money is invested on it because the price of the required software might increase after getting completed.
  • Scalable database software should be bought so that it can extend according to need at low cost.

 

8 0
4 years ago
You can move to the previous or next sheet by pressing the ____ keys.
Paladinen [302]
<span>ctrl+pg up (or ctrl) + pg down</span>
8 0
3 years ago
Which of the following is used by credit card companies to determine APR?
kodGreya [7K]
Prime rate + credit history (APEX)
4 0
3 years ago
Read 2 more answers
Other questions:
  • Alburry and wagga wagga are 130km apart. How many centimeters apart are they on a map with a scale factor of 1:250000?​
    13·1 answer
  • Tony is interviewing with the hiring manager for an IT job.
    11·1 answer
  • Which of the following does NOT describe word processing?
    11·2 answers
  • Select all that apply.
    8·1 answer
  • Name the part of windows<br> explore window​
    7·2 answers
  • Determine the number of cache sets (S), tag bits (t), set index bits (s), and block offset bits (b) for a 1024-byte 4-way set as
    5·1 answer
  • Is the Internet dangerous?
    10·2 answers
  • Multiple Choice: Circle the letter that corresponds to the correct answer.
    12·1 answer
  • A(n) ___ is a set of CPUs which work in parallel in an attempt to simulate the way the human brain works, although in greatly si
    5·1 answer
  • Weak passwords are a(n) ___________ threat
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!