+ 1
Python
Create a code that languages Python using “if statement” and the process is Asking for two numbers. If the firt one is larger than the second display the and number first, then the Is number. Otherwise, show the first no. first and then the second *Sample output Enter first numbe: 123 Enter second number: 456
9 Answers
+ 5
Attempts?
+ 4
Please share the code
+ 4
Learn Python course from here and solve your problem.
https://www.sololearn.com/Course/Python-for-Beginners/?ref=app
+ 3
Adriane Silang an if is the same as:
if ( I do this ( condition ) and it's OK ):
print("Possible rewards ( based on this condition )")
elif:
print("I knew I should have done something else ( but I still am going to be rewarded )")
else:
print("Obviously I didn't do either and now I have error-ed in my ways")
+ 2
Adriane Silang Pls note this is a learning app, and this section is for programming questions. It is not meant to ask others to write code for you.
+ 1
Ritik Kaushal Pls avoid giving finished code as answer, because it makes the OP skip the most important part of learning. Prefer giving hints for the OP to find the solution.
0
Sorry,my question is give a code to how create python using “if staement”
0
Get two inputs from user and store it on different variables and use simple if statement
If(a<b):
Print("%d is greater"%b)
else:
Print("%d is greater"%a)
0
w = input ("выберите действие; '+' '-' '/' '*': ")
y = input ("введите первое число: ")
x = input ("введите первое число")
if w = "+":
a = y + x
print ("результат: " + str(a))
elif w = w = "-":
a = y - x
print ("результат: " + str(a))
elif w = w = "/":
a = y / x
print ("результат: " + str(a))
elif w = w = "*":
a = y * x
print ("результат: " + str(a))
else:
print ("некорректно введены данные")
input ()