First Submission Lesson 03

I will not have a chance to work on task_05 tonight and I'm not getting the result I need for task_04.
Professor,

I’m not sure why Task 04 keeps kicking back an error at me. I’ve tried a couple of different ways and am getting the desired result, apparently not in the way you wanted us to get there.

DAY = raw_input('What day is it? ').lower()[0:3]
TIME = raw_input('What time is it in a four digit number, no ":"? ')
SNOOZE = ()

SNOOZE = True if DAY == ('sat', 'sun') or TIME < '0600' else False
if SNOOZE == True:
    print ()
else:
    print 'Beep! Beep! Beep! Beep! Beep!'

And this way:

DAY = raw_input('What day is it? ').lower()[0:3]
TIME = raw_input('What time is it in a four digit number, no ":"? ')
SNOOZE = ()

SNOOZE = True if DAY == ('sat', 'sun') or TIME < '0600' else False
if SNOOZE == False
    print 'Beep! Beep! Beep! Beep! Beep!'

I have also tried putting print after the else in the ternary statement. This does not appear to be allowed as gives a syntax error when I try to run it in IDLE.

What does it mean when it tells me it needs to be if cond True: or if cond: I thought that was what I was doing?

Thank you.

KJ

From: Chad Heuschober [mailto:notifications@github.com]
Sent: Saturday, September 13, 2014 9:14 PM
To: is210-2014-fall-02/is210_lesson_03
Cc: kevin.doles@spsmail.cuny.edu
Subject: Re: [is210_lesson_03] First Submission Lesson 03 (#2)


In task_04.py:

> @@ -0,0 +1,14 @@

> +#!/usr/bin/env python

> +# -*- coding: UTF-8 -*-

> +'''User is prompted for date and time. If conditions are met, initiates alarm.

> +'''

> +

> +DAY = raw_input('What day is it? ').lower()[0:3]

> +TIME = raw_input('What time is it in a four digit number, no ":"? ')

> +SNOOZE = ()

> +

> +if (DAY == 'sat' or 'sun') and (TIME < '0600'):

Hi kevin. This one's easy, it's in your 'sat', 'sun' part.

Day is comparing to sat but what's being compared against sun? Remember that non-empty strings are truthy so your 'sun' is always forcing truthiness.

—
Reply to this email directly or view it on GitHub<https://github.com/is210-2014-fall-02/is210_lesson_03/pull/2/files#r17515779>.