Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: tidying Up
Post: tidying Up
Hi,
I'm not sure if I have cleaned up my code enough could I make it more tidy?
# PRINT ROWS #
def printing(c):
print("1: " + " ".join(c[0]))
print("2: " + " ".join(c[1]))
print("3: " + " ".j... |
|
SummoningZ |
Homework |
1 |
2,652 |
Sep-10-2017, 08:47 PM |
|
|
Thread: card 21 trick
Post: RE: card 21 trick
Just so you're all aware I have quit my course, thanks for the motivational help when im trying my best to learn it :) |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-24-2017, 10:30 AM |
|
|
Thread: card 21 trick
Post: RE: card 21 trick
I have tried to understand so stop talking to me like I just wrote something online and just sat back waiting for the answer, I just wanted an idea of what the whole thing looked like so I could devel... |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-22-2017, 07:56 PM |
|
|
Thread: card 21 trick
Post: RE: I need help with my coding - Python 3
I DONT KNOW HOW TO WRITE IN PYTHON DO YOU NOT UNDERSTAND WHAT I AM TRYING TO TELL YOU |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-22-2017, 03:14 PM |
|
|
Thread: card 21 trick
Post: RE: I need help with my coding - Python 3
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-19-2017, 09:30 PM |
|
|
Thread: card 21 trick
Post: RE: I need help with my coding - Python 3
Thank you nilamo.
Ok so now I have this import itertools
import itertools
import random
suits = "DCHS"
numbers = list(map(str, range(2, 11))) + list("JQKA")
full_deck = ["".join(pair) for pair in ... |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-18-2017, 09:11 PM |
|
|
Thread: card 21 trick
Post: RE: I need help with my coding - Python 3
Im not asking you to do it for me im just asking for some kind of idea of what im doing as all the stuff you are saying means nothing to me.
Pack =["JS","4C","KC","3H","5H","AD","10H","9H","7S","JD",... |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-18-2017, 06:41 PM |
|
|
Thread: card 21 trick
Post: RE: I need help with my coding - Python 3
(Aug-17-2017, 12:52 PM)sparkz_alot Wrote: You use the ".extend" by using lists. So for example, if "first", "second" and "third" were lists rather than tuples, you could use ".extend" with them, ie ... |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-18-2017, 12:27 PM |
|
|
Thread: card 21 trick
Post: RE: I need help with my coding - Python 3
(Aug-17-2017, 12:52 PM)sparkz_alot Wrote: You use the ".extend" by using lists. So for example, if "first", "second" and "third" were lists rather than tuples, you could use ".extend" with them, ie ... |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-17-2017, 01:04 PM |
|
|
Thread: card 21 trick
Post: RE: I need help with my coding - Python 3
(Aug-17-2017, 12:38 AM)sparkz_alot Wrote: As @nilamo pointed out, you've defined "packet" as a function and as such has no attribute ".extend", lists, however do. Have no idea what you are trying to... |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-17-2017, 09:28 AM |
|
|
Thread: card 21 trick
Post: RE: I need help with my coding - Python 3
How do I fix this problem, please help I need it by next week I have been trying for at least 2 weeks.
(Aug-16-2017, 09:08 PM)nilamo Wrote: (Aug-16-2017, 08:48 PM)SummoningZ Wrote: The error is "... |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-16-2017, 09:23 PM |
|
|
Thread: card 21 trick
Post: RE: I need help with my coding - Python 3
(Aug-16-2017, 05:50 PM)SummoningZ Wrote:
The error is "AttributeError: 'function' object has no attribute 'extend'
The site wouldnt let me put indents in thats why its not showing. |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-16-2017, 08:48 PM |
|
|
Thread: card 21 trick
Post: card 21 trick
Hi, I have a coding project for school which involves me making a program to do the 21 card trick in python.
I have started to make the program but am stuck on why it is not running, here is what I ha... |
|
SummoningZ |
Homework |
21 |
15,941 |
Aug-16-2017, 05:50 PM |