Edhesive 3.6 code practice answer please
Answers
Answer:
largest = -999
for i in range(0,6):
b = float(input("Enter a number: "))
if b > largest:
largest = b
print("Largest: ", largest)
Explanation:
In order to pass all tests done by edhesive to check the code, you must ensure the following:
1. Ensure that the numbers are in the right order and separated by some whitespace.
2. output contains correct number order
3. Make sure the program works properly and identifies the correct largest numbers, even when negative numbers are entered as input.
4. Make sure code works properly, identifying the correct largest numbers when numbers larger than 500,000,000 are entered as input.
5. Confirm that the program uses input, conditionals, and calculations to determine printed values. Your program code should not only include print statements.
This code does just that, and passes the code check, giving you a correct answer!
Answer:
In order to give all trials done by edhesive to check the code, you must confirm the following:
Explanation:
1. Confirm that the digits are in the proper order and divided by some whitespace.
2. output possesses right digit order
3. Make sure the program functions properly and determines the right largest digits, even when opposing digits are joined as input.
4. Make sure code works properly, identifying the accurate largest digits when digits larger than 500,000,000 are entered as input.
5. Ensure that the program uses input, conditionals, and measures to define printed values. Your program code should not just have print statements.
a = int(input("Enter a number: "))
print("Largest: " + str(a))
b = int(input("Enter a number: "))
print("Largest: " + str(max(a,b)))
c = int(input("Enter a number: "))
print("Largest: " + str(max(a,b,c)))
d = int(input("Enter a number: "))
print("Largest: " + str(max(a,b,c,d)))
e = int(input("Enter a number: "))
print("Largest: " + str(max(a,b,c,d,e)))
f = int(input("Enter a number: "))
print("Largest: " + str(max(a,b,c,d,e,f)))
#SPJ3