Question: I am receiving this feedback using the code given. Unsure what I am doing wrong. Status: FAILED! Check: 1 Test: The program correctly sorts 1
I am receiving this feedback using the code given. Unsure what I am doing wrong.
Status: FAILED!
Check:
Test: The program correctly sorts and
Reason: Unable to find Smallest: Next largest: Largest: in the program's output.
Enter the first:Enter the second:Enter the third:smallest:
next smallest:
greatest:
Error : AssertionError
Timestamp: ::
Status: FAILED!
Check:
Test: The program correctly sorts and
Reason: Unable to find Smallest: Next largest: Largest: in the program's output.
Enter the first:Enter the second:Enter the third:smallest:
next smallest:
greatest:
Error : AssertionError
Timestamp: ::
Status: FAILED!
Check:
Test: The program correctly sorts and
Reason: Unable to find Smallest: Next largest: Largest: in the program's output.
Enter the first:Enter the second:Enter the third:smallest:
next smallest:
greatest:
Error : AssertionError
This is the code entered:
# Swap.py This program determines the minimum and maximum of three values input by
# the user and performs necessary swaps.
# Input: Three int values.
# Output: The numbers in numerical order.
# Initialize variables.
first
second
third
# Get user input.
#values input.
firstintinputEnter the first:"
secondintinputEnter the second:"
thirdintinputEnter the third:"
iffirstsecond: #check if first number is greater then swap it
tempfirst
firstsecond
secondtemp
ifsecondthird: # check if second number is greater then swap it
tempsecond
secondthird
thirdtemp
iffirstsecond: #lastly again check if first number is greater then swap it
tempfirst
firstsecond
secondtemp
#print in numerical order.
printsmallest:first
printnext smallest:",second
printgreatest:third
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
