Mathematical Operations
Bilgisayarlar
- Q. Multiply 10 with 5, and print the result.
print(10 ? 5)
- Q. Divide 10 by 2, and print the result.
- Q. Use the correct membership operator to check if "apple" is present in the fruits object.
fruits = ["apple", "banana"]
if "apple" fruits:
print("Yes, apple is a fruit!")
- Q. Use the correct comparison operator to check if 5 is not equal to 10.
if 5 ? 10:
print("5 and 10 is not equal")
- Q. Use the correct logical operator to check if at least one of two statements is True.
if 5 == 10 ? 4 == 4:
print("At least one of the statements is true")
OPEN