Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books