0

Can someone help me?in python

Write a Python program that uses an if statement to find the smallest of three given integers. (The user should enter the three numbers).

30th Oct 2021, 10:50 AM
Wasan M
8 Réponses
+ 10
Krishnam Raju M , you are showing a really nice code to help someone solving a task. we all appreciate this very much!  (this is my personal statement - but it is not to criticize someone !!) but there is an issue by giving a ready solution, when the op has not done and shown his attempt first. as a part of the community i believe that learning by doing is more helpful, than just using a shared solution. we should act more as a mentor.  it is a very successful way when we are giving hints and help, so that the op is able to solve his task by himself. it would be great if you are going to help us to keep sololearn what it is: ▪︎a unique place to learn (we are a "self" learning platform!) ▪︎an absolutely great community that is willing to help other people  ▪︎a great resource of people which has an unbelievable knowledge in coding and a long lasting experience ▪︎a place to meet people and to discuss with them all the possible points of view thanks for your understanding
30th Oct 2021, 11:01 AM
Lothar
Lothar - avatar
+ 7
Lothar you miesepetric betterknower: An if was demanded, so how can you say, it is unnecessary???
30th Oct 2021, 8:10 PM
Oma Falk
Oma Falk - avatar
+ 6
Oma Falk , a little bit education for you? print('enter three integers: ') x = int(input('first: ')) y = int(input('second: ')) z = int(input('third: ')) #if 1==1: # <<< That is completely unnecessary and is doing nothing at all. so we should omit it print('smallest: ', min(x,y,z)) # we do not need to convert the 3 variables to a list first, we can just use them inside min() function ( da haben wir doch wieder was gelernt! )
30th Oct 2021, 8:01 PM
Lothar
Lothar - avatar
+ 4
print('enter three integers: ') x = int(input('first: ')) y = int(input('second: ')) z = int(input('third: ')) if 1==1: print('smallest: ', min([x,y,z])) Folks.... we can't educate them. At least have some fun🍁🍁🍁 @edit Lothar told me, my last two lines could be misunderstood. I mean we can't avoid homework posts and posting their solutions. But we can think about some variations of solution beyond classroom.
30th Oct 2021, 2:11 PM
Oma Falk
Oma Falk - avatar
+ 4
Oma Falk - great new English word, "miesepetric"! @OxfordDictionary please add it your New Word List.
30th Oct 2021, 8:36 PM
Brian
Brian - avatar
+ 2
print('enter three integers: ') x = int(input('first: ')) y = int(input('second: ')) z = int(input('third: ')) if x < y and x < z: print('smallest: ', x) elif y < z: print('smallest: ', y) else: print('smallest: ', z)
30th Oct 2021, 11:00 AM
Krishnam Raju M
Krishnam Raju M - avatar
+ 2
Hi, Wasan : I know you are new here , so here is Python for beginners course. https://www.sololearn.com/Course/Python-for-Beginners/?ref=app
30th Oct 2021, 2:53 PM
**🇦🇪|🇦🇪**
**🇦🇪|🇦🇪** - avatar
+ 1
Lothar Well said 😁👍
30th Oct 2021, 12:43 PM
Rik Wittkopp
Rik Wittkopp - avatar