The format for using the conditional operator is: expression ? value1 : value2 What data type must value1 be? String int boolean any of these data types
Added by David G.
Close
Step 1
The format is: expression ? value1 : value2. Show more…
Show all steps
Your feedback will help us improve your experience
Sanchit Jain and 69 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
What are the value and data type (float, int, bool, or str) of this expression: 5 % 2
Sanchit J.
The string data type can be used: a. as an operand for the $==$ or $!=$ b. as an expression in the switch statement to be evaluated c. as an operand for the $>$ or $<$ operator d. a and b are correct e. all of the above
True is what type of variable? a. Float b. string c. Integer d. Boolean python 3
Haricharan G.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD