#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ENGG1811 Lecture 2 Purpose: This example is to demonstrate nested-if Program description: This program asks - the user to input a real number - determines whether the number is * bigger than 5 * in the interval [0,5] * negative - outputs the decision to the user """ # Ask the user to input a number num = float(input('Please input a number: ')) # Decide if number is in (5,infinity), [0,5] or negative if num >= 0: if num > 5: print('The number entered is > 5') else: print('The number entered is in the interval [0,5]') else: print('The number entered is negative')