Question: Please give the expected output from the given code samples. If the code will result in an error (which some may) please correct the error

Please give the expected output from the given code samples. If the code will result in an error (which some may) please correct the error so it will properly run and then give the output. NOTE: any errors in spacing or quotes are not intentional, Word will sometimes change spacing and symbols. Uses Python code

if (var == 9418):

print("Hmmm. That is a very specific number")

elif (var > 3):

print("I do not like your number")

if (var % 2 == 0):

print("At least your number is even")

else:

print("What an ODD choice")

else:

print("I like small numbers")

print("Thanks for playing")

For Questions 1-5 use the above code.

  1. var = 5
  2. var = 2
  3. var = 8
  4. var = 9418
  5. var = -3

For question 6, assume the user has input a 4 as the user input.

  1. Num = input("Enter an Integer")

if Num > 2:

print(num / 2)

else:

print(num + 3)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!