Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 761 Bytes

File metadata and controls

18 lines (16 loc) · 761 Bytes

🔢Numbers in Python

Printing a number in python is very easy and you can do it in two ways.

  • To print the number as it is.
    eg: print(10)
  • To print it using a variable
    eg: num = 79 print(num)
  • ➗Arithematic operations

  • Various arithematic operations can be performed in python like +,-,* and /.
    eg: print(78+22)
    print(78+22.934)
  • In a similar fashion you can also use the '%' operator to find remainder of division.
    eg: print(20%3)
  • ⛓️Concatenation Rule

  • Concatenation is python is only possible if the input is a string, For a number to be concatenated it should be first converted to a string or ',' operator should be used.
    eg: print('10, is a number)