Pinned Loading
-
From http://www.practicepython.org/e...
From http://www.practicepython.org/exercise/2014/03/12/06-string-lists.html 1st = input('String pls: ')
23is_pal = 1
4s_len = len(st)
5half_len = int(s_len/2)
-
From http://www.practicepython.org/e...
From http://www.practicepython.org/exercise/2014/03/19/07-list-comprehensions.html 1a = [1,4,9,16,25,36,49,64,82,100]
23new_list = [val for val in a if (a%2) == 0]
4print(new_list)
-
From: http://www.practicepython.org/...
From: http://www.practicepython.org/exercise/2014/02/05/02-odd-or-even.html 1num = int(input('Number pls: '))
23if (num%4) == 0:
4odd_even = 'divisible by 4!'
5elif (num%2) == 0:
-
From: http://www.practicepython.org/...
From: http://www.practicepython.org/exercise/2014/01/29/01-character-input.html 1import datetime
23now = datetime.datetime.now()
45name = input('What is your name? ')
-
From http://www.practicepython.org/e...
From http://www.practicepython.org/exercise/2014/02/26/04-divisors.html 1num = 0
2while num < 1:
3num = int(input('Num: '))
45divs = []
-
From http://www.practicepython.org/e...
From http://www.practicepython.org/exercise/2014/02/15/03-list-less-than-ten.html 1import random
23a = []
4for x in range(0,100):
5a.append(random.randint(1,10))
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.