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
lorasvet [3.4K]
3 years ago
6

How do I add decimals in python?

Computers and Technology
1 answer:
lara31 [8.8K]3 years ago
8 0

x = 0.6

y = 0.4

print(x + y)

This will output 1.0 to the console.

You could also just do:

print(0.6+0.4)

This will yield the same result.

You might be interested in
Please someone help me I hate python
VLD [36.1K]
Python is actually an easy language to learn and use. IDLE is an iffy IDE to use. One thing about IDLE that drives me nuts is that when it saves a file, it converts tabs to spaces (you can adjust how many in the prefs). This causes impossible to find indentation errors because several spaces are NOT the same as a tab, but you can't see the difference on the screen.

# the standard way to put the main function after declaring functions and
# classes
if( __name__ == "__main__" ):

import sys
# check that the program was called with the correct number of arguments
if( len( sys.argv ) != 2 ):
    sys.stderr.write( "\nusage:  %s <argument>\n" % ( sys.argv[ 0 ] ) )
    sys.exit( 1 )
else:
    # do something nifty
    sys.exit( 0 )


8 0
3 years ago
The Review tab in Microsoft Publisher provides two groupings called _____. Proofing and Language Spell Check and Research Proofi
anastassius [24]

Answer:

Proofing and language.

Explanation:

8 0
3 years ago
Wireless networks usually use ____ signals to send data.
barxatty [35]
<span>Wireless networks usually use radio (b) signals to send data. </span>
6 0
3 years ago
Read 2 more answers
What are the types of action involving data base?
Alexeev081 [22]

Answer: The DBMS is a software system that explains the four types of actions, which are defining, constructing, manipulating, and sharing databases among various users and applications.

3 0
3 years ago
The total number of possible keys for des is _________, which a modern computer system can break in a reasonable amount of time.
FinnZ [79.3K]
The answer is two. Most people think it's one but it's 2
3 0
3 years ago
Other questions:
  • To connect multiple usb devices to a single usb port, a ____ can be used.
    12·1 answer
  • What is the acronym for computerized command provides weather by microphone clicks?
    8·1 answer
  • 3) An example of interactive web page is<br>​
    11·1 answer
  • Ask the user to enter the number of elements in a list of numbers. Take in the numbers from the user and then output the list th
    6·1 answer
  • Brainly wont show me the "I'm Done" button after an interactive ad, and I cant figure out why. I've watched the entire ad, click
    11·2 answers
  • Union Carbide accident safety policies and procedures were not followed was due to
    14·1 answer
  • Which of the following is NOT one of the Big 3 Google Applications that we discussed?
    9·2 answers
  • g How safe is to have a LinkedIn account where you have published all the important information about yourself
    13·2 answers
  • Evaluate a career in the telecommunications industry that most interests you. What about the career appeals to you?
    8·1 answer
  • Profitability, consumer relations, and competition are involved in what kinds of concerns in the design process?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!