Question & Answer: I need the solution to this in python please…..

I need the solution to this in python please

Write an expression using Boolean operators that prints “Special number” if special_num is -99, 0, or 44.

problem is as follows :

special_num = 17

if ”’ Your solution goes here ”’:
print(‘Special number’)
else:
print(‘Not special number’)

Expert Answer

 

Note: The code is for Python 3. Please indent the code as shown in the screenshots.

Program screenshots:

Sample output 1 (special_num = 17):

Sample output 2 (special_num = 44):

Code to copy:

# Define the special number.

special_num = 17

# Compare the special number with the given values.

if (special_num == -99) or (special_num == 0) or (special_num == 44):

 

# Print the message that the number is a special number.

print(‘Special number’)

# Otherwise, print the message that the number

# is not a special number.

else:

print(‘Not special number’)

Still stressed from student homework?
Get quality assistance from academic writers!