Python Exercise #4 | multiple If condition in python

Veröffentlicht am: 27 Juli 2020
auf dem Kanal: Technolazy
39
2

Python Exercise #4: Working with if condition
In this video we are going to work with python if condition.

Syntax:
if (condition):
code
elif (condition):
code
else:
final code



num1 = int(input("Please enter num1 value : "))
num2 = int(input("Please enter num2 value : "))
operator = input("Please select the operator : ")

if operator == '+':
print("The addition of num1 and num2 is :" ,(num1+num2))
elif operator == '-':
print("The subraction value of num1 and num2 is ;" ,(num1-num2))
elif operator == '/':
print("The division value of num1 and num2 is ;", (num1/num2))
elif operator == '*':
print("The multiplicaiton of num1 and num2 is :" ,(num1*num2))
else:
print("Invalid operator selection")

#end of code

python exercises
python examples
python if condition
python if statement
python for beginners
python tutorials


Auf dieser Seite können Sie das Online-Video Python Exercise #4 | multiple If condition in python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Technolazy 27 Juli 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 39 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!