This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def date_fashion(you, date): | |
| if you <= 2 or date <= 2: | |
| return 0 | |
| elif you >= 8 or date >= 8: | |
| return 2 | |
| else: | |
| return 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def squirrel_play(temp, is_summer): | |
| if is_summer and temp >= 60 and temp <=100: | |
| return True | |
| elif not is_summer and temp >= 60 and temp <= 90: | |
| return True | |
| else: | |
| return False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def caught_speeding(speed, is_birthday): | |
| if is_birthday and speed <= 65: | |
| return 0 | |
| elif is_birthday and speed >= 66 and speed <= 85: | |
| return 1 | |
| elif speed <=60: | |
| return 0 | |
| elif speed >= 61 and speed <= 80: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def sorta_sum(a, b): | |
| sum = a + b | |
| if sum >= 10 and sum <=19: | |
| return 20 | |
| else: | |
| return sum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def first_last6(nums): | |
| if nums[0] == 6: | |
| return True | |
| elif nums[len(nums) -1] == 6: | |
| return True | |
| else: | |
| return False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def make_pi(): | |
| x = [3, 1, 4] | |
| return x | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def make_ends(nums): | |
| first = nums[0] | |
| last = nums[len(nums) -1] | |
| x = [first, last] | |
| return x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def middle_way(a, b): | |
| amid = a[1] | |
| bmid = b[1] | |
| x = [amid, bmid] | |
| return x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def alarm_clock(day, vacation): | |
| if not vacation and day >=1 and day <=5: | |
| return "7:00" | |
| elif (not vacation) and (day == 0 or day == 6): | |
| return "10:00" | |
| elif vacation and day == 0 or day ==6: | |
| return "off" | |
| elif vacation and day >=1 and day <=5: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def love6(a, b): | |
| sum = a+b | |
| diff = a-b | |
| diff2 = b-a | |
| if a == 6 or b == 6: | |
| return True | |
| elif sum == 6 or diff == 6 or diff2 == 6: | |
| return True |