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 have tried formatting this into a ternary expression a number of ways.

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' or 'sun' or TIME < '0600' else False
if SNOOZE == False:
    print ('Beep! Beep! Beep! Beep! Beep!')

This returns true no matter what I do. I thought I had adjusted as we had discussed, but to no avail. Also, is there a way to fit the print expression into the ternary expression? I tried that too, and it was kicking back a syntax error.

Thank you.

Best regards,

KJ

From: Chad Heuschober [mailto:notifications@github.com]
Sent: Thursday, September 11, 2014 9:11 AM
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'):

You are correct. However, the directions also state that this should be a ternary expression not a standard if so you'll want to change that as well.

—
Reply to this email directly or view it on GitHub<https://github.com/is210-2014-fall-02/is210_lesson_03/pull/2/files#r17419293>.