Created
April 25, 2020 15:34
-
-
Save tjguk/840ba3948217844e710e5ff4aee994d3 to your computer and use it in GitHub Desktop.
This file contains 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
# Write your code here :-) | |
# l = ['Tim', 'David', 'Peter', 'Tommy'] | |
# for i in l: | |
# print(int(i)) | |
# iterator = iter(l) | |
# while True: | |
# try: | |
# print(next(iterator)) | |
# except StopIteration: | |
# break | |
# while True: | |
# age = input("what is your age? ") | |
# try: | |
# print(int(age)) | |
# except ValueError: | |
# print("Whoops; please write your age in numbers") | |
# else: | |
# break | |
import random | |
def randomised(l): | |
l2 = list(l) | |
random.shuffle(l2) | |
return l2 | |
c = Cards() | |
print(repr(c)) | |
for i in c: | |
print(i) |
This file contains 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
# Write your code here :-) | |
# l = ['Tim', 'David', 'Peter', 'Tommy'] | |
# for i in l: | |
# print(int(i)) | |
# iterator = iter(l) | |
# while True: | |
# try: | |
# print(next(iterator)) | |
# except StopIteration: | |
# break | |
# while True: | |
# age = input("what is your age? ") | |
# try: | |
# print(int(age)) | |
# except ValueError: | |
# print("Whoops; please write your age in numbers") | |
# else: | |
# break | |
import random | |
def randomised(l): | |
l2 = list(l) | |
random.shuffle(l2) | |
return l2 | |
c = Cards() | |
print(repr(c)) | |
for i in c: | |
print(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment