APS1070-ReadingAssignment1

pdf

School

University of Toronto *

*We aren’t endorsed by this school

Course

1070

Subject

Mathematics

Date

Apr 3, 2024

Type

pdf

Pages

2

Uploaded by Ccyy123

Report
Reading assignment 1 Due Jan 17 at 9p.m. Points 20 Questions 7 Available Jan 8 at 10a.m. - Jan 20 at 9p.m. Time Limit None Instructions This quiz was locked Jan 20 at 9p.m.. Attempt History Attempt Time Score LATEST Attempt 1 3,278 minutes 20 out of 20 Score for this quiz: 20 out of 20 Submitted Jan 10 at 9:55p.m. This attempt took 3,278 minutes. Question 1 2 / 2 pts True Correct! False Question 2 2 / 2 pts This is the quiz for reading assignment 1. The following questions relate to the Kaggle course on Python which is freely accessible at https://www.kaggle.com/learn/python (https://www.kaggle.com/learn/python) . You may check the course (and its different lessons, exercises, and solutions) before attempting this quiz. Question 1) Determine True/False for the following statement based on the lesson (https://www.kaggle.com/code/colinmorris/functions-and-getting-help) on “Functions and Getting Help”: Functions in Python should always return something. Question 2) According to the lesson (https://www.kaggle.com/code/colinmorris/booleans-and- conditionals) on “Booleans and Conditionals”, what is the output of the following code in Python?
(False, True) True (False, False) (True, True) False Correct! (True, False) Question 3 4 / 4 pts -3 is positive is negative Correct! None of the other options -3 is negative -3 is zero Question 4 2 / 2 pts planets[0:3] , planets[3] (2.0 == 2),('2' == 2) Question 3) According to the lesson (https://www.kaggle.com/code/colinmorris/booleans-and- conditionals) on “Booleans and Conditionals”, what is the result of running the following code in Python? def inspect(x): if not x == 0: print(x, "is zero") elif x > 0: print(x, "is positive") else: print("is negative") inspect(-3) Question 4) According to the lesson (https://www.kaggle.com/code/colinmorris/lists) on “Lists”, which of the following pairs result in the same output for the following list? planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help