Skip to content

Instantly share code, notes, and snippets.

@bcuz
Created September 4, 2017 17:29
Show Gist options
  • Select an option

  • Save bcuz/b3f0be1918a12d02869e5e5316549806 to your computer and use it in GitHub Desktop.

Select an option

Save bcuz/b3f0be1918a12d02869e5e5316549806 to your computer and use it in GitHub Desktop.
from time import sleep
from math import *
print "Hello! This project will bring togetherr other projects from Github. You are requested by Mr. Brown to input a list of numbers and the program will calculate the minimum, maximum, absolute value, square root and squares of the numbers you have provided.Remember! You may only enter integers or floats. But you may try to enter something else. But I doubt my code will allow it."
# sleep(2)
print"Go ahead, enter the values"
user_input= raw_input("Give me your values. Seperate using space: " ).split()
try:
numbers = [ int(x) for x in user_input ]
for i in numbers:
if type(i) != int:
print 'no'
print "The mininimum and maximum of the numbers you have entered are %d, %d" % (min(numbers), max(numbers))
except ValueError:
print 'non number in there'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment