Thursday, October 29, 2015 7:52 PM

Python Basic if-else expression (Activity 4.2.2)

Python
Question:
Write an expression that will print "Even" if the value of user_num is an even number. 

Code:

user_num = 13
if user_num%2==0:
    print('Even')
else:
    print('Odd') 

About Unknown

Here you can share some biographical information next to your profile photo. Let your readers know your interests and accomplishments.

2 comments:

  1. This is Mr. R......some of you are using this site to cheat. There is something to say for learning through trial and error, or learning from your mistakes. Copy and paste != learning
    If you scroll up within each section you will be able to review and see exact examples of the challenges.

    ReplyDelete
    Replies
    1. Or like in my case I work full-time (job is not flexible) and unable to go to school to get help at the times that are given for tutoring. My professor doesn't response to emails or voicemails until the last minute so if I don't get a topic before the assignment is due and have been stuck on the same problem well of course people will try to look up the answer. It's better to figure how to do a problem sooner to get an idea of how to work around the problem and study it before it's too late. I take this class fully online. If a student is on campus for this class, has the ability to access tutors, and has a professor that responds to calls or emails in a reasonable time then I completely agree with your argument.

      Delete