Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Help with 2 Python questions
-
This post is deleted! -
Your answer to question 2 is wrong. This is also not an appropriate question for this forum (in my opinion) as it has nothing to do with pythonista, it's just generally about Python. Please post it on stackoverflow.
-
This post is deleted! -
I think so.
-
Not to be rude, but asking us to do the quiz for you doesn't help you in any way. If we tell you the answers, you'll complete the quiz, but you haven't learned anything. The next time you get a similar question in an exam, you won't be able to answer it correctly (especially if your exam is not a multiple-choice test and you have to write a full answer yourself).
If you're not sure that your answers are correct, look through your school book or worksheets that you were given in class. If you were right, then great! If not, then compare the correct answer with the one you thought was right and see what you understood wrong. The next time you'll know better. If you're still unsure and have more questions, ask your classmates or your teacher. They can answer your questions better than we can, because they know what you've already learned in class. Not to mention that it's a lot quicker to ask someone in real life than to wait hours for random internet people.
;)
-
This post is deleted! -
Question 2 is easy to figure out:
- Change all occurrences of '
line
' to 'print
' (with a trailing space before the number). - Add '
; throw(Error)
' to the end of line 3. - Make sure your indentation exactly matches the quiz question.
- Run the program for you answer.
- Change all occurrences of '
-
@ccc said:
- Add '
; throw(Error)
' to the end of line 3.
Normally you'd write
raise Exception()
. Of coursethrow(Error)
works as well - it'll give you aNameError
, because the namethrow
is not defined.;)
- Add '
-
LOL... Good catch. You are correct.
-
@Pythonistapro777 , are you on stackflow? It's a great site. Covers a lot of languages, I guess probably all. Absolute massive database of answers to all sorts of questions. I ask some Python oriented questions here sometimes because I am not exactly sure if there are some limitations or differences about running in Pythonista.
But look if you are not on stackflow, get on there ASAP. You will love it. So many things have already been answered. I use use it all the time. As far as I know, it's the by far the biggest programming resouce on the web. No sign up fees, you can sign in with your Facebook account if you wish.
Again, don't sweat it too much. It's just using the right resources for the right answers. You also have to be disciplined on stackflow. They want you to search for your answer first, rather than just post a question. Its understandable, otherwise you end up with literally thousands of duplicated questions.
Btw, I would have got question 2 wrong also :) but I would have done what was suggested by putting in the print statements.
Happy coding!