Quizzes/Master Python with These Key Concepts
·
•••Report content
Master Python with These Key Concepts

Master Python with These Key Concepts

Test your Python knowledge with this essential quiz covering variables, operators, conditionals, loops, and more!

0 plays 5 questions @fabulous-acorn3
All 5 questions
  1. In Python 3.x, what output will be generated by the following code snippet? def func(): x = 10 print(x) x = 20 func() print(x)10 10 · 20 10 · 10 20 · 20 20
  2. What will be the output of the following code: print(f'Result: {5 * 3.0 + 2}')?Result: 53.0 · Result: 17.0 · Result: 17 · Result: 152
  3. Which of the following codes correctly implements a while loop to exit on user input 'stop'?while input('> ') != 'stop': · while input('> ') == 'stop': continue · while True: if input('> ') == 'stop': break · while input('> ') not in ['stop']:
  4. Which expression correctly checks if 'num' is positive and divisible by 2 in Python?num % 2 != 1 and num >= 0 · not (num <= 0) and num % 2 == 0 · num > 0 and num % 2 == 0 · num > 0 or not num % 2
  5. What will 'print(type([1, 2, 3]))' output in Python?<class 'array'> · <class 'list'> · <class 'int'> · <class 'tuple'>

More quizzes

All quizzes
YOUR CREATION. YOUR CHOICE.

Made by you.
Seen by who?

Before you create, choose who gets to see it.

Generation visibility
18+ only

Show mature content?

Mature mode shows adults who turn it on tasteful 18+ creations.