quizzn
Discover
Groups
Sign up
Log in
Technology
Python tricks
8 questions · by Tarasics · 5 learners
Practice quiz
Flashcards
Questions
1.
Inline if statement: if x: y=100 else: y=20
2.
>>> x = 60 >>> 1 < x < 100
3.
>>> x = 4 >>> 9 < x < 20
4.
>>> x = 5 >>> x < 10 < x*10 < 100
5.
>>> x = 10 >>> 10 == x > 7
6.
>>> d = {'four': {'six': 6, 'five': 5}, 'three': [3, 33, 333], 'two': 2, 'one': 1} Print out to console only first level of dictionary like this: >>> {'four'…
7.
Replace RED space
8.
One-line class declaration: >>> class MyClass(object): >>> spam = "I am spam"