Code Monkey home page Code Monkey logo

lpthw's People

Contributors

eykd avatar ianthedrummer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

lpthw's Issues

Exercise 8 Study Drill responses

Study Drill 1: Zed Shaw just wanted me to check my work.

Study Drill 2: I think that he uses single-quotes for big group strings and double-quotes for individual strings. I think that he does this so that there is more individuality between strings.

Exercise 29 Study Drill Responses

SD #1: I think that the if statement is saying that IF said variable or other thing is true that it is to do whatever the code underneath it says. But, if the variable or other thing is false than to just ignore the bottom text.

SD #2: It needs to be indented to show that the bottom code is part of the if statement. If it's not indented, then you will either get an error or the code will run like normal just ignoring the if statement.

SD #3: If it's not indented, then you will either get an error or the code will run like normal just ignoring the if statement.

SD #4: Yes, you can but then the printed text would make absolutely no sense :P

SD #5: Then, you get the same results just with differently named variables. But if you just change the names of the first three lines, then you'll get an error saying that cats, dogs, and people aren't defined.

Exercise 30 Study Drill #1 Response

SD #1: I think that else is saying that if the if statement isn't true than to try and see if the else statement is. The elif however is a combination of an else statement and the if statement. It's giving an if statement as an else statement.

Play Adventure!

  • Play Adventure. See if you can finish it by New Year's. ๐Ÿ˜ We'll read through the code next year.

ex28 Study Drill 1 - 2 response

Equality Operators:

 < "Less Than"
 <= "Less Than Or Equal"
 > "Greater Than"
 >= "Greater Than Or Equal"
 == "Equal"
 != "Not Equal"
 is "Object identity"
 is not "Negated Object Identity"

Hint: I combined study drills 1 and 2 to make one big response since the two went together!

Exercise 43 Study Drill 2Response

If you didn't have the return 'room', then python would just assume to return none or exit. So, instead of returning none and not having a solid flowing game, we return the next room which tells python to simply go ahead to the next room.

Exercise 16 Study Drill 5

No, you do not need to truncate the file. It's redundant since, as you noticed, opening in write mode will overwrite the file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.