Question: Instructions You will be given three integers: , and (read in for you). Then you will be given two boolean values that tell you which

Instructions

You will be given three integers: , and (read in for you). Then you will be given two boolean values that tell you which way the numbers are going - if the numbers are in increasing order or in decreasing order, respectively.

 

Details

Input

  • The program reads in:

    • a sequence of three integers: , and

    • boolean isIncreasing: set to True if the sequence of integers is increasing, i.e. (note, we are reading in either 0 for False or 1 for True)

    • boolean isDecreasing: set to true if the sequence of integers is decreasing, i.e. >>

Processing

  • Based on the boolean values read in determine if the sequence of integers is increasing, decreasing or neither.

Output

  • The original order is output for you.
  • If the sequence of integers is increasing, output The numbers are increasing "The numbers are strictly increasing."
  • If they are decreasing, output The numbers are decreasing "The numbers are strictly decreasing."
  • Otherwise, output No obvious order "There is no strict order."

Sample input/output:

Input Output

1 2 4

1 2 4

The numbers are strictly increasing.

5

3

1

5 3 1

The numbers are strictly decreasing.

13 7 24

13 7 24

There is no strict order.

Instructions You will be given three integers: , and (read in for

using python

pod1.py* New Full Screen ## 2 # CSCI 1105 3 # Week 6, POD 1 4 # @author: ?? vou WN 7 # Input 8 i, j, k = (int(s) for sin input().split() 9 isIncreasing, isDecreasing = (bool(int(s)) for sin input().s 10 11 #Output print( "Original order:", i, j, k ) 13 14. #=================EEEE! ================ 15 # PLEASE FIX/FINISH THE FOLLOWING WORK 17 '18 - if isIncreasing : 19 print( "True branch" ) 20 - else : 21 print( "False branch" ) 22

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!