r/pythonhelp • u/KeganBergi • Dec 08 '21
PYTHON ASSIGNMENT PLS SOMEONE LOL
Read in the included data file and write it to a file named sorted_data.txt with the same data, but order the columns in ascending alphabetical order.
https://www.dropbox.com/s/snhowdtcne6zuuf/MOCK_DATA-3.txt?dl=0
That is the link to the data file that is supposed to be initially read in.
1
Upvotes
1
u/[deleted] Dec 08 '21 edited Dec 08 '21
There's a lot of people starting out on this subreddit and getting great help. Some people take to programming very quickly but others find it very difficult at first and it takes a lot of effort to get it.
I help a lot of kids learn to programme through the Code Club organisation, working in local schools, and also sometimes teach adults at local community college.
For most of those who find it difficult, I find the problem is usually that they assume the computer is far more intelligent than it actually is. They find it difficult to dumb things down sufficiently for a very stupid (compared to a human) machine. This is partly because it is hard as humans to see all the leaps we make when carrying out tasks.
I give some people an exercise to sort a small set of cards, say 10 number cards, that have been shuffled, into the correct order. Most people can do this very quickly and easily. However, when I say to write down the instructions for someone with significant learning difficulties, assuming they have a very short memory, can only hold one card in their hand at a time, people find it a lot more challenging than they expected. I get them to put a load of bits of paper down on the table, with labels on them A .. J. And an extra bit of paper off to the side as a holding area. It takes a while and is very irritating for some when I play the computer and do dumb stuff because I've not got an instruction to do anything else.
It is definitely worth looking at the learning guidance and materials in the wiki for this subreddit. There's some great content.
The only way to learn though is practice! Practice! Practice! With lots of failure and experimentation. I recommend people make use of the Python Interactive Shell, the one with the >>> prompt in IDLE, as you get instant feedback when trying things out, and don't need to use long variable names, real data - just quickly check how to do something simple.
Did the example code I shared make any sense?
EDIT: The wiki is for the /r/learnpython subreddit - forgot where I was.