Practice #29: Find position of a Point relative to a Circle | Python Programming for Beginners

preview_player
Показать описание
In this exercise, you'll write a program that accept user input:
- a Circle: coordinates x, y of the center, and radius
- a Point: coordinates x, y

then check and output the position of the Point relative to the Circle
The program should return one of 3 cases:
- the Point is inside the Circle
- the Point is outside the Circle
- the Point is on the Circle

In this video, I show you how to use built-in function hypot() from math module to find distance between 2 points, instead of using Pythagorean theorem formula
-------------------------
Python Coding for Beginners
Python Programming for Beginners
Learn Python by Building Projects
Python Exercises and Practical Examples with solutions
Practice Python Online with solution
How to write a Python program
Python Programming Data Structure and Algorithm
Python Problem Solving
Python Game Tutorial
Python Game Programming
Python Game Development
Python Tips and Tricks
Рекомендации по теме
Комментарии
Автор

This is quite a regular topic when you are create a game and need to check if one object is colliding with another object. In future, I make some more videos about using Python to find solution for geometry exercises

makeeverydayezday
Автор

I got an assignment at school today, how to find relative position of 2 circle (separate, touching, one in another, intersect), and this video helped me a lot. Thanks!

JamesAdams-wczl
Автор

Really Really thanks a lot ❤✨ this video was really helpful for me. In making of my project for college assignment otherwise I'll be just copy pasting the code from other videos.

sammccane
Автор

Thanks for the help, I was trying to graph something using turtle and this video helped a lot.

waynelineker
visit shbcf.ru