#!/usr/bin/env python3; ############################################################################### # This program demonstrates how to prompt the user for input. # # Copyright © 2020 Richard Lesh. All rights reserved. ############################################################################### import Utils # Begin Main try : favoriteIntInput = Utils.prompt("What is your favorite small integer? ") favoriteInt = int(favoriteIntInput) favoriteLongInput = Utils.prompt("What is your favorite large integer? ") favoriteLong = int(favoriteLongInput) favoriteDoubleInput = Utils.prompt("What is your favorite floating point? ") favoriteDouble = float(favoriteDoubleInput) sum = favoriteInt + favoriteLong + favoriteDouble print("All together they add up to {0:f}!".format(sum)) except ValueError as ex : print("Bad input! " + str(ex)) except Exception as ex : print("Don't know what went wrong!")