Screenshots:
Warm-up, strings, logic
Lists
Favorite exercises:
String-1 Withoutend
1
2
def without_end(str):
return str[1:-1]
List-1 Has23
1
2
3
4
5
6
7
8
9
10
def has23(nums):
if 2 in nums:
return True
if 3 in nums:
return True
else:
return False
Logic-1 Sorta sum
1
2
3
4
5
6
def sorta_sum(a, b):
total = a+b
if total > 9 and total < 20:
return 20
else:
return total