
If conditional statement

Flashcard
•
Mathematics
•
University
•
Hard

Ariel LU
Used 1+ times
FREE Resource
Student preview

4 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Fill in the if condition to check whether a number is odd or even.
number = int(input("Enter a number: "))
if ____________: # Fill in the condition
print("This is an even number")
else:
print("This is an odd number")
Back
number % 2 == 0
2.
FLASHCARD QUESTION
Front
Fill in the if condition to check whether the user is eligible to vote (18 years or older).
age = int(input("Enter your age: "))
if ____________: # Fill in the condition
print("You are eligible to vote")
else:
print("You are not eligible to vote yet")
Back
age>=18
3.
FLASHCARD QUESTION
Front
Fill in the if condition to check whether a number is positive or negative.
number = int(input("Enter a number: "))
if ____________: # Fill in the condition
print("The number is positive")
else:
print("The number is negative")
Back
number >= 0
4.
FLASHCARD QUESTION
Front
Fill in the if condition to check whether a student has passed (score ≥ 60) or failed.
score = int(input("Enter your score: "))
if ____________: # Fill in the condition
print("You passed!")
else:
print("You failed")
Back
score>=60
Similar Resources on Wayground
5 questions
Arrays

Flashcard
•
11th Grade
7 questions
Flashcard on Accumulators and Sentinel Values

Flashcard
•
12th Grade
10 questions
Arrays

Flashcard
•
10th - 12th Grade
10 questions
AP CSA Unit 1

Flashcard
•
12th Grade
11 questions
Java String Objects & Methods

Flashcard
•
12th Grade
3 questions
Untitled Flashcards

Flashcard
•
9th Grade - University
4 questions
flashcard - Papo formativo_Pensamento computacional_EM_R7

Flashcard
•
KG - University
11 questions
Computer Programming

Flashcard
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade