28 Answers
New AnswerYou are provided with two numbers as input
7/2/2022 9:12:16 AM
chandrakanth karamthod28 Answers
New Answer* get 2 input() * convert input to numeric data type * use an if-statement and >= to compare the numbers If you need help, please explain what your issue us.
Please be exact about the expected input. If you get the input as 1 line, split the line at the separator. Then convert each element to a numeric data type. Then compare the numbers.
input().split(",") You get a list of strings: make each element an integer, then you can use min(). And PLEASE: ⭐⭐⭐Try to put your comments or additions in 1 comment instead of spreading each bit of information into an extra comment.⭐⭐⭐
lis =[ ] count = int(input()) for n in range(count): number = int(input()) lis.append(number) print(min(lis))
You need only 2 inputs. Your code would require min 3 inputs to get the 2 numbers. If you are referring to a sololearn task, mention course name and task number.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message