Fork me on GitHub

Coding Bat Lists/strings/logic/warmup

by Sierra Moore

14 Sep 2002

Screenshots:

Warm-up, strings, logic codingbat

Lists list

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
Sierra is a first year MSIS student Find Sierra Moore on Twitter, Github, and on the web.