2. Programming Fundamentals
Introduction To Programming — Quiz
Test your understanding of introduction to programming with 5 practice questions.
Practice Questions
Question 1
What will the following Python code print? $$x = 4\\\ny = 7\\\nprint(x + y * 2)$$
Question 2
In Python, which of the following is the correct syntax for a conditional statement that checks if $x$ is greater than 10 and prints 'High'?
Question 3
What will be the value of $result$ after the following code executes? $$a = 5\\\nb = 3\\\nresult = a ** b$$
Question 4
In Python, what is the correct way to write a loop that iterates over the list $[1, 2, 3]$ and prints each element?
Question 5
What will the following Python code print? $$x = 10\\\ny = 3\\\nprint(x // y)$$
