Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

smallest number of 3 python

a = int(input('Enter first number  : '))
b = int(input('Enter second number : '))
c = int(input('Enter third number  : '))

smallest = 0

if a < b and a < c :
    smallest = a
if b < a and b < c :
    smallest = b
if c < a and c < b :
    smallest = c

print(smallest, "is the smallest of three numbers.")
Comment

how to print smallest number in python

# creating empty list
lis = []

# user enters the number of elements to put in list
count = int(input('How many numbers? '))

# iterating till count to append all input elements in list
for n in range(count):
    number = int(input('Enter number: '))
    lis.append(number)

# displaying smallest element
print("Smallest element of the list is :", min(lis))
Comment

smallest possible number in python

The smallest possible number in python (not underflow to 0)
is the smallest possible subnormal number.

# L is the lowerbound exponent given by IEEE754 double precision.
L_sub < (machine_epsilon * 2**L)  =  (2**-52) * (2**-1022) = 2**-1074

Thus, smallest_number = 2*-1074 => 5e-324
Comment

PREVIOUS NEXT
Code Example
Python :: basic flask app python 
Python :: django charfield force lowercase 
Python :: send api request python 
Python :: how to make software in python 
Python :: Add PostgreSQL Settings in Django 
Python :: dataframe of one row 
Python :: pyqt5 plain text edit get text 
Python :: lable on graph in matplotlib 
Python :: terminal commands for install python on cpanel 
Python :: python program to find second largest number in a list 
Python :: python code to demonstrate inheritance 
Python :: pandas rolling mean 
Python :: generate random list and find max in list python 
Python :: hex to string python 
Python :: most repeated character in a string python 
Python :: python replace one character into string 
Python :: converting tuple into string 
Python :: python read input 
Python :: assert integer python 
Python :: generate n different colors matplotlib 
Python :: python 2.7 get user input 
Python :: reading the JSON from a JSON object 
Python :: python round 1 decimal place 
Python :: print multiplication table python 
Python :: ranking 
Python :: pandas to python datetime 
Python :: python string replace variable 
Python :: python variable scope 
Python :: python delete elements from list / range 
Python :: Local to ISO 8601: 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =