quiz image

If challenges

momogamain avatar
momogamain
·
·
Download

Start Quiz

Study Flashcards

4 Questions

x = 10
y = 20
if x > 5 and y < 25:
    x += 5
    y += 5
elif x > 5 or y > 25:
    x -= 5
    y -= 5
else:
    x *= 2
    y *= 2


x = 15, y = 25

if data['info']['status'] == 'active' and data['info']['count'] > 30:
    result = "Proceed"
else:
    result = "Hold"

Proceed

s = "Hello World"
if s[:5] == "Hello":
    print("Greeting detected!")
else:
    print("No greeting.")

Greeting detected!

numbers = [1, 2, 3, 4, 5]
sum = 0
for n in numbers:
    if n % 2 == 0:
        sum += n
print(sum)

6

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser