Author Topic: Learning Python  (Read 6956 times)

0 Members and 1 Guest are viewing this topic.

Offline Computer-Lab in Basement

  • The needs of the many outweigh the needs of the few.
  • * Elevated Elder
  • Thread Starter
  • Posts: 3025
  • Location: NCC-1701, USS Enterprise
  • Live long and prosper
Learning Python
« on: Wed, 01 April 2015, 10:50:59 »
So I've been using Codeacademy to try and learn some Python stuff, and I get to this lesson when it says to:

Quote
Instructions
Create three dictionaries: lloyd, alice, and tyler.
Give each dictionary the keys "name", "homework", "quizzes", and "tests".
Have the "name" key be the name of the student (that is, lloyd's name should be "Lloyd") and the other keys should be an empty list. (We'll fill in these lists soon!)

And this is my code:

Code: [Select]
lloyd = {
    'name': ['Lloyd'],
    'homework': [],
    'quizzes': [],
    'tests': []
}

alice = {
    'name': ['Alice'],
    'homework': [],
    'quizzes': [],
    'tests': []
}

tyler = {
    'name': ['Tyler'],
    'homework': [],
    'quizzes': [],
    'tests': []
}

And it keeps giving me this error:

Quote
Oops, try again. The name key does not have the value "Lloyd" in your lloyd dictionary.

Am I crazy, or is Codeacademy crazy?
tp thread is tp thread
Sometimes it's like he accidentally makes a thread instead of a google search.

IBM Model M SSK | IBM Model F XT | IBM Model F 122 | IBM Model M 122 | Ducky YOTD 2012 w/ blue switches | Poker II w/ Blue switches | Royal Kludge RK61 w/ Blue switches

Offline SpAmRaY

  • NOT a Moderator
  • * Certified Spammer
  • Posts: 14667
  • Location: ¯\(°_o)/¯
  • because reasons.......
Re: Learning Python
« Reply #1 on: Wed, 01 April 2015, 10:55:39 »
Do they want "Lloyd" including quotes?

Offline Computer-Lab in Basement

  • The needs of the many outweigh the needs of the few.
  • * Elevated Elder
  • Thread Starter
  • Posts: 3025
  • Location: NCC-1701, USS Enterprise
  • Live long and prosper
Re: Learning Python
« Reply #2 on: Wed, 01 April 2015, 10:58:47 »
single and double quotes are interchangeable in Python as far as I know. and I tried both and got the same error.
tp thread is tp thread
Sometimes it's like he accidentally makes a thread instead of a google search.

IBM Model M SSK | IBM Model F XT | IBM Model F 122 | IBM Model M 122 | Ducky YOTD 2012 w/ blue switches | Poker II w/ Blue switches | Royal Kludge RK61 w/ Blue switches

Offline trizkut

  • * Global Moderator
  • Posts: 1207
  • Location: MA
Re: Learning Python
« Reply #3 on: Wed, 01 April 2015, 11:06:57 »
get rid of the square brackets surrounding the names, I don't think they want a list for the name key.


Offline Dihedral

  • Posts: 827
  • Location: United Kingdom
  • Mostly Harmless
Re: Learning Python
« Reply #4 on: Wed, 01 April 2015, 11:08:14 »
get rid of the square brackets surrounding the names, I don't think they want a list for the name key.

Code: [Select]
lloyd = {
    'name': 'Lloyd',
    'homework': [],
    'quizzes': [],
    'tests': []
}

alice = {
    'name': 'Alice',
    'homework': [],
    'quizzes': [],
    'tests': []
}

tyler = {
    'name': 'Tyler',
    'homework': [],
    'quizzes': [],
    'tests': []
}

Offline Computer-Lab in Basement

  • The needs of the many outweigh the needs of the few.
  • * Elevated Elder
  • Thread Starter
  • Posts: 3025
  • Location: NCC-1701, USS Enterprise
  • Live long and prosper
Re: Learning Python
« Reply #5 on: Wed, 01 April 2015, 11:13:12 »
welp... problem exists between keyboard and chair...
tp thread is tp thread
Sometimes it's like he accidentally makes a thread instead of a google search.

IBM Model M SSK | IBM Model F XT | IBM Model F 122 | IBM Model M 122 | Ducky YOTD 2012 w/ blue switches | Poker II w/ Blue switches | Royal Kludge RK61 w/ Blue switches

Offline Dihedral

  • Posts: 827
  • Location: United Kingdom
  • Mostly Harmless
Re: Learning Python
« Reply #6 on: Wed, 01 April 2015, 11:14:32 »
welp... problem exists between keyboard and chair...

It's a reasonable mistake to make. The lesson or whatever it's called was not too explicit in its' requirements.

Offline noisyturtle

  • * Exalted Elder
  • Posts: 6427
  • comfortably numb
Re: Learning Python
« Reply #7 on: Wed, 01 April 2015, 17:22:43 »
I am getting PTSD from 'learning' this in school. What an absolute nightmare of a language.

Offline clacktalk

  • CLACKS RULE EVERYTHING AROUND ME
  • Posts: 739
  • Location: California
  • circa 2015
Re: Learning Python
« Reply #8 on: Wed, 01 April 2015, 17:24:14 »
I am getting PTSD from 'learning' this in school. What an absolute nightmare of a language.

what
diary of a clacktalk

franktalk: how much urine have u spilled
radio_killah: too much frank
radio_killah: too much

Offline exitfire401

  • * Global Moderator
  • Posts: 2969
  • Location: United States
  • The Force is Re/\l
Re: Learning Python
« Reply #9 on: Wed, 01 April 2015, 17:28:43 »
welp... problem exists between keyboard and chair...

Looks like you got one of them I d10 T errors sir. Take two of these, and call me in the morning.



But really, it happens. Took me a long time to learn how to look for errors in Python. Simple mistakes happen. As long as you're learning from them, it's completely acceptable.
Boards: Kingsaver Complicated Blue Alps |Sprit 60% Transparent MX Clears in Gateron housings with 62g gold Sprit springs lubed and RGB color shifting LEDs | Ducky Shine Zone MX Black with Blue LEDs | Realforce 10AE Variable Silenced

B/S/T thread: https://geekhack.org/index.php?topic=55351.0

Past projects: KBT Race 2 L.E.
Past Boards: Ducky Shine 2 | KBT Pure | LZ Aluminum Skin| HHKB | Realforce 23u |

Offline pr0ximity

  • Posts: 2705
  • Location: Maine
Re: Learning Python
« Reply #10 on: Wed, 01 April 2015, 21:27:18 »
I am getting PTSD from 'learning' this in school. What an absolute nightmare of a language.

What do you prefer? Or perhaps I should say, what makes it a 'nightmare'?
| Flickr | KMAC 1.2 | Koala | GSKT-00-Z | GSKT-00-AEK | GON NerD60 | Jane V2 CE | Whale | J80S | Ibis | Pro2 | Pro1 | 356mini | 356CL DGE | G80-5000 HAMDE | IBM 1390120 | IBM F AT | IBM F122 | IBM 3101 | Zenith Z-150

Offline jacobolus

  • Posts: 3661
  • Location: San Francisco, CA
Re: Learning Python
« Reply #11 on: Wed, 01 April 2015, 21:32:45 »
I am getting PTSD from 'learning' this in school. What an absolute nightmare of a language.
I assume this is an April Fools joke?

Offline retrochick

  • Posts: 600
  • goodbye my wallet
Re: Learning Python
« Reply #12 on: Mon, 20 April 2015, 11:13:43 »
I've found Code Academy to be a great intro to coding for people who have no experience whatsoever, but soon you will realize that you want to go more in depth with a language than just printing out strings and numbers. Also as mentioned above, the instructions are sometimes not very clear and Code Academy tends to move rather slowly. If you have some experience in programming, http://help.exercism.io/getting-started-with-python.html might be more helpful. You basically use Git to commit and push your changes/exercises, which is then peer reviewed. The feedback is actually helpful, and they suggest ways to help you improve your code. Another good resource to check out if you're somewhat of a beginner but you're familiar with terminal and coding in general would be Learn Python The Hard Way by Zed Shaw.


Cherry is love. Topre is life. ~raymogi