Booleans & conditionals in Python | Khan Academy

Programming
سال2011
دورانیہ36m

Can computers be objective decision makers? Discover selection as you design algorithms that allow the computer to decide which code to run and when. Learn how to evaluate boolean expressions and construct conditionals to add branching logic to your programs. Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course! Course link: https://www.khanacademy.org/computing/intro-to-python-fundamentals/x5279a44ae0ab15d6:designing-algorithms-with-conditionals Full course playlist: https://www.youtube.com/playlist?list=PLSQl0a2vh4HDkbhG0sDW0b-VZXykEIAe5 Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits, and mindsets for success in school and beyond. Khan Academy has been translated into dozens of languages, and 15 million people around the globe learn on Khan Academy every month. As a 501(c)(3) nonprofit organization, we would love your help! Donate or volunteer today! Donate here: https://www.khanacademy.org/donate?utm_source=youtube&utm_medium=desc Volunteer here: https://www.khanacademy.org/contribute?utm_source=youtube&utm_medium=desc

آپ کو یہ بھی پسند آ سکتا ہے

تبصرے

8 تبصرے

STEPHANIE BOAFO 💦🦋🥺❤️Jun 25, 2025

What assumptions does an algorithm make? Evaluate the biases behind both human-generated and AI-generated algorithms. Learn how to consume and design algorithms responsibly. Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course! Course link: https://www.khanacademy.org/computing... Course playlist: •IntrotoComputerScience-Python|Khan... Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits, and mindsets for success in school and beyond. Khan Academy has been translated into dozens of languages, and 15 million people ar

👑 _MALìK_ 👑❤Jun 25, 2025

Code along with a software engineer in this worked example using if-elif-else statements. Apply chained conditionals with if, elf, and else branches to calculate an object's weight on other planets based on the gravitational force. View the program used in this video at: https://www.khanacademy.org/python-pr... Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course! Course link: https://www.khanacademy.org/computing... Course playlist: •IntrotoComputerScience-Python|Khan... Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills

user4151750406169Jun 25, 2025

How can we write conditionals with multiple branches of control flow? Trace the execution of chained conditionals to understand how the computer chooses which if, elif, or else branch to execute. View the program used in this video at: https://www.khanacademy.org/python-pr... Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course! Course link: https://www.khanacademy.org/computing... Course playlist: •IntrotoComputerScience-Python|Khan... Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits, and mindsets for success i

🥀Oumaima_zarrouq🥀Jun 25, 2025

Code along with a software engineer in this worked example using logical operators. Apply compound boolean expressions and if statements to design a content moderation algorithm. Use the logical and, or, and not operators to construct compound conditions that flag suspicious posts and feature useful posts. View the program used in this video at: https://www.khanacademy.org/python-pr... Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course! Course link: https://www.khanacademy.org/computing... Course playlist: •IntrotoComputerScience-Python|Khan... Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide tea

Big Natty 🌠📸🥳Jun 25, 2025

Trace how the computer evaluates compound boolean expressions with the logical operators and, or, and not. See how the computer optimizes to short-circuit evaluation if it already knows the result. Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course! Course link: https://www.khanacademy.org/computing... Course playlist: •IntrotoComputerScience-Python|Khan... Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits, and mindsets for success in school and beyond. Khan Academy has been translated into dozens of languages,

💕Kady💕Jun 25, 2025

Code along with a software engineer in this worked example using single branch if statements. Apply boolean expressions and if statements to design a program that determines a passenger's bus fare based on their age group. View the program used in this video at: https://www.khanacademy.org/python-pr... Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course! Course link: https://www.khanacademy.org/computing... Course playlist: •IntrotoComputerScience-Python|Khan... Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits,

Puseletso SetseoJun 25, 2025

Learn how to branch control flow with conditionals. Trace the execution of an if statement to understand how the computer chooses which line of code to execute next. View the program used in this video at: https://www.khanacademy.org/python-pr... Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course! Course link: https://www.khanacademy.org/computing... Course playlist: •IntrotoComputerScience-Python|Khan... Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits, and mindsets for success in school and beyond. Khan Acad

ســـومـــه♥️🌸Jun 25, 2025

What is an algorithm? Use algorithms to plan out your programs, and evaluate approaches to a problem based on correctness, efficiency, and readability. Explore how to use selection in your algorithms to branch control flow in response to new information. Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course! Course link: https://www.khanacademy.org/computing... Course playlist: •IntrotoComputerScience-Python|Khan... Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits, and mindsets for success in school and beyond. Kh