Learn to Program: The Fundamentals — Week 2 Exercise Score of 17.00 out of 18.00 . Answer the following questions. Some of the questions will require you to run code in IDLE's Python shell. (You should do this anyway to get used to using IDLE.) Question 1 Which of the following results in a SyntaxError ? Your Answer Score Explanation '''yes no''' Correct 0.25 "yes no" Correct 0.25 'yes\nno' Correct 0.25 'yes no' Correct 0.25 Total 1.00 / 1.00 Question Explanation Try typing each option exactly as it appears into IDLE, paying particular attention to newlines. Copying and pasting might not work, so if you're frustrated, try typing them out. Make sure you understand why each one does what it does! Question 2 Which of the following results in a SyntaxError ? Your Answer Score Explanation '"Once upon a time...", she said.' Correct 0.25 "He said, "Yes!"...
Comments
Post a Comment