Questions LLC
Login
or
Sign Up
Ask a New Question
Conditional Statements
Page 6
Questions (388)
What will the following program print when run?
var numberOne = 5; var numberTwo = 10; if (numberOne == 5) { println(1); } if
1 answer
asked by
joe
32 views
What will the following program print when run?
var above16 = true; var hasPermit = true; var passedTest = false; if (above16 &&
1 answer
asked by
joe
36 views
In the following code block, assume that the variables rainy and tooCold are boolean.
IF ((NOT rainy) AND (NOT tooCold)) {
1 answer
asked by
joe
37 views
How do you identify the statements that will execute when an "if" expression evaluates to True?
Select one: a. Mark them with
1 answer
asked anonymously
33 views
Which of the following "if" statements correctly asks if the value in the "condition" variable is greater than 5?
Select one: a.
1 answer
asked anonymously
48 views
Given the following code, under what conditions will "You got me" be printed to the screen?
if (expression1): if (expression2):
7 answers
asked anonymously
23 views
What will be printed to the screen when the following code is run?
favoriteColor = "blue" if (favoriteColor != "blue"):
1 answer
asked anonymously
32 views
You can now write simple logical expressions like "score > 100" or "cost <= 120". But as you can imagine, a program may need to
1 answer
asked anonymously
22 views
What are the three keywords that can begin conditional statements
1 answer
asked by
Kee
19 views
What is the conclusion of the following conditional statement? If it rains, then I will bring my umbrella.
1 answer
asked anonymously
28 views
When a conditional and its converse are true, you can combine them as a true
1 answer
asked anonymously
22 views
An if statement must always begin with the word if.
(1 point) Responses True True False
1 answer
asked anonymously
83 views
Sonja is writing a program to compare two numbers and print the larger number. Which of these should be used?
(1 point) Responses
1 answer
asked anonymously
119 views
When will an else statement be executed?
(1 point) Responses The if statement is true. The if statement is true. The if statement
1 answer
asked anonymously
68 views
What are the three keywords that can begin conditional statements?
(1 point) Responses if, elif, else if, elif, else if, when,
1 answer
asked anonymously
45 views
If a program needs to respond to what the user inputs by printing one of three different statements, what will the program
1 answer
asked anonymously
126 views
What is the converse of the following conditional?
If a point is in the first quadrant, then its coordinates are positive. (1
1 answer
asked anonymously
11 views
“It’s a bird! It’s a plane! No, it’s Superman!”
We want to write a function isSuperman that takes in two parameters
1 answer
asked anonymously
19 views
an if-then statement an example that shows a statement to be false formed by switching the hypothesis and conclusion of a
1 answer
asked by
h
33 views
Match the correct name with the statement using the following conditional If something is a car, then it is a vehicle. (4
1 answer
asked by
ditto
24 views
Question
Under what circumstances will the indented line of code immediately after an if statement be executed? (1 point)
1 answer
asked anonymously
29 views
Question
If you want to add a third option to if and else, you can use: (1 point) Responses print print input input alter alter
1 answer
asked anonymously
25 views
What is the conclusion of the following conditional statement?
If it rains, then I will bring my umbrella. (1 point) Responses it
1 answer
asked anonymously
128 views
When a conditional and its converse are true, you can combine them as a true
(1 point) Responses counterexample. counterexample.
1 answer
asked anonymously
77 views
The statement "if we were late, we won't be able to see the movie previews" is an example of which of these
Alteration Iterative
1 answer
asked by
Will
20 views
Vincente wants to write a program that let's the player move a unicorn around the screen. But vincente wants a warning to appear
1 answer
asked by
Will
17 views
Which word should be used to begin the line of code that will direct the program to do something when a condition is not met?
A.
1 answer
asked by
Kee
28 views
When will an else statement be executed?
A. The if statement is true B. The if statement is false C. There is a syntax error D.
1 answer
asked by
Kee
20 views
What are the three necessary parts of an if statement?
1 answer
asked by
Kee
38 views
What are the three necessary parts of an if
statement? A. If, a variable, a semi-colon B. If, a print statement, a colon C. If, a
1 answer
asked by
Kee
32 views
Suppose you are writing code to process data from a questionnaire. One of the questions is what grade are you in? The code looks
1 answer
asked by
hatemaths
29 views
Which of these is an example of a conditional statement?
(1 point) A. I eat lunch at noon. B. If I am hungry, I will eat lunch.
1 answer
asked anonymously
32 views
A conditional statement begins with the word "when."
(1 point) • True • False
1 answer
asked anonymously
20 views
Which word should a programmer use to describe what should happen when the condition of an if statement is NOT met?
(1 point) A.
1 answer
asked anonymously
18 views
The statement "If we are late, we won't be able to see the movie previews" is an example
of which of these? (1 point) A.
1 answer
asked anonymously
25 views
Vincente wants to write a program that lets the player move a unicorn around the screen. But Vincente wants a warning to appear
1 answer
asked anonymously
27 views
When should else be used in programming?
(1 point) A. if something should be repeated several times B. in a non-conditional
1 answer
asked anonymously
30 views
formed by switching the hypothesis and conclusion of a conditional statement
1 answer
asked anonymously
34 views
If you want to add a third option to if and else, you can use:
(1 point) O print O input alter elif
1 answer
asked anonymously
13 views
Under what circumstances will the indented line of code immediately after an if statement be executed?
(1 point) if the condition
1 answer
asked anonymously
21 views
Which word should be used to begin the line of code that will direct the program to do something when a condition is not met?
(1
1 answer
asked anonymously
27 views
What symbol must be used at the end of an if statement?
(1 point) O #
1 answer
asked anonymously
10 views
When will an else statement be executed?
(1 point) The if statement is true The if statement is false There is a syntax error The
1 answer
asked anonymously
20 views
Sonja is writing a program to compare two numbers and print the larger number. Which of these should be used?
(1 point) while
1 answer
asked anonymously
18 views
What are the three necessary parts of an if statement?
(1 point) Oif, a variable, a semi-colon if, a print statement, a colon if,
1 answer
asked anonymously
32 views
A program contains an if statement followed by an else statement. When the condition in an if statement is met, what happens to
3 answers
asked anonymously
25 views
What is the converse of the following conditional?
If a point is in the first quadrant, then its coordinates are positives. a. if
1 answer
asked by
sda
22 views
when would the following conditional be false?
if you work 20 hours a week, then you make $125.00. a. you work 25 hours a week,
1 answer
asked by
sda
29 views
when would the following conditional be false?
If you work 20 hours a week then you make $125.00. a. You work 25 hours a week,
1 answer
asked by
sda
25 views
Given the following code, what can be said about result1 and result2 ?
result1 = (A < 3) or (B > 5) and ((C + D) == 42) result2 =
1 answer
asked anonymously
16 views
Pages
1
2
3
4
5
6
7
8
Parent Categories (77)
Algebra
Algorithms
Algorithms and Data Structures
Algorithms and Logic
Angle relationships
Angles
Basic Programming Concepts
C programming
C++
Cause-and-effect
Code Execution
Coding
Coding or Programming
Coding/Programming
Computer Programming
Concepts
Control Flow
Control Statements
Control structures
Data Processing
Decision-Making
Decision-making structures
Deductive Reasoning
English Language Arts
Equivalence
Equivalent Statements
Flowcharts and C code
Functions
Game Development
Geometry
Geometry/theory
Grammar
Grammar and Syntax
Grammar or Linguistics
Grammar rules
Java programming
Javascript
Language and Communication
Language and Grammar
Logic
Logic and Programming
Logic and Reasoning
Logic and Statements
Logic/formal reasoning
Logical Equivalence
Logical operations
Logical Reasoning
Mathematical Statements
Mathematics and Logic
Program Design
Programming
Programming and Logic
Programming Basics
Programming Concepts
Programming Language Constructs
Programming Languages
Programming logic
Programming/Computer Science
Propositional Logic
Pseudo Code
Pseudocode
Python
Python Programming
Sentence Structure
Statement Types
Statements
Symbolic Logic
Symbolic statements
Syntax
Syntax and Grammar
Syntax Errors
Troubleshooting
Truth tables
Truth Values
Truth Values and Logic
Types of Statements
Variables and Data Types