Week 1 Assignment (Part 1 - Questions)
22. October 2024
Question 1
What is the result of the following operation 9 // 4?
2.25
❌1.999999
❌2
✅2.0
❌Question 2
What does the abbreviation "IPO" stand for?
Infinite Programming Opportunities
❌Intelligent Python Operation
❌Input Processing Output
✅International Processing Organization
❌Question 3
Which function is used to get user input into a program?
userinput()
❌input()
✅read_keyboard()
❌getinput()
❌Question 4
Which of the following are data types in Python?
Note: There are 3 correct answers to this question.
Time
❌Name
❌String
✅Boolean
✅Integer
✅Question 5
Which of the following Boolean expressions is True?
Note: There are 3 correct answers to this question.
(25 > 100) or (25 < 100)
✅25 == "25"
❌(25 < 100) and (25 > 100)
❌not(100 < 99)
✅17 > 10
✅Question 6
Which of the following statements about the syntax of the if-else
statement are correct?
Note: There are 3 correct answers to this question.
To make the program more readable, you can use indention wherever you like.
❌Each if-statement requires the else-part. An if without an else leads to an error.
❌The code block (the one belonging to the if- or else-part) needs to be indented.
✅There must be at least one conditional statement. No statement behind the if and continuing directly with the else leads to an error.
✅The evaluation of the condition can have exactly two values: True or False.
✅Question 7
Which of the following conditions are True?
Note: There are 3 correct answers to this question.
not(not(False)
❌True or False
✅True and True
✅not(False)
✅True and False
❌Question 8
Which of the following statements about if-statements are correct?
Note: There are 2 correct answers to this question.