Math in Python is easy + exercises 📐
Вставка
- Опубліковано 12 чер 2024
- #Python #math #module
Python arithmetic operators and math module tutorial example explained
00:00:00 arithmetic operators
00:04:23 built-in functions
00:06:43 math module
00:08:44 exercise #1 circumference of a circle
00:10:30 exercise #2 area of a circle
00:12:00 exercise #3 hypotenuse calculator
if friends == 0:
if weed == 0:
print('the hell is unavoidable, gg wp')
else:
print('You escaped the hellhole for a while, but it wont last for long')
else:
print('You are dreaming, wake up. This is not happening.')
😂
How relatable do you want the thumbnail to be?
Bro Code: Yes
Absolutely delightful video. Thanks a lot for sharing.
very nice lesson.
How can you say that you have no friends by now you have gattered at least more than half a million of them
He's talking about you
@@TheBennestBen deadass
@@TheBennestBen bozo
@@TheBennestBennah bro I support you for that one
@@TheBennestBen looolll
Very goood
Wonderful to learn python from your videos. You teach so well in an easy way. Sir can you please give some exercises as a daily lesson for beginners.
Good job, thank you
Excellent .
Adding stupid features to this simple exercises makes them really fun tho.
import math
Title = "Pizza circumference and area calculator"
print(Title.title())
diameter = input("Please enter diameter of your pizza: ")
flavour = input("Enter your pizza's flavour: ")
if flavour == "Hawaii" or "Pineapple":
print("How the fuck can you eat that?")
if bool(diameter.isdigit()) == False:
print("This is not a diameter of your pizza >:(")
if bool(diameter.isdigit()) == True:
diameter = int(diameter)
r = diameter/ 2
C = 2 * math.pi * r
A = math.pi * pow(r,2)
C = round(C, 1)
A = round(A, 1)
print(f"The circumference of your {flavour} pizza equals: {C} cm.")
print(f"The area of your {flavour} pizza equals {A} cm^2.")
Third Program
import math
Title = "Weird triangle thingy calculator"
print(Title.upper())
side_a = input("Enter first side of a triangle: ")
side_b = input("Enter second side of a triangle: ")
if bool(side_a.isdigit()) == False or bool(side_b.isdigit()) == False:
print("Cant make math out of that.")
print("Both sides have to be numbers")
elif bool(side_a.isdigit()) == True and bool(side_b.isdigit()) == True:
side_c = math.sqrt(pow(int(side_a), 2) + pow(int(side_b), 2))
print(f"The third side of this triangle equals {round(side_c, 2)} cm")
I owe everything I learned in programming to BroCode, so I encourage everyone to use this channel. If you want to know what progress I've made since then, check here ua-cam.com/video/xQJxIXOVleE/v-deo.html
bro is best in youtube i can say
Love ❤ you for the exercise and explaining way.
For you 🌷⚘🌹💯
Watched it. Liked it.
If 'Friends = 0;'
So '100 friends' means '0 * 100 = 0'.
So it's still 0 then.
100 friends means friends = 100
the start was dark💀
@@Akash-wi4yz friends = -2 tho 💀💀💀💀💀💀💀💀🗿🗿🗿🗿🗿🗿🗿🗿
Thanks bro code I know very little about python and I have a project where I need to make a pizza ordering thing from scratch and this really helped so again thank you
Superb
Ended up in the loophole making myself create a sine and cosine rule calculator lol it was fun
thanks bro!
Thank you! :)
We have half of friend😂 good informative vid too
Bro said it was going to be confusing, but made it the easiest thing I’ve ever seen
3:37 Is an amazing way to explain remainders. Understood it right away.
Thank you ❤️😊
thanks Bro
thx 4 vid bro !
NICELY DONE BRO...❤5/106
nice bro
BRO you better then my teacher math😅❤
عظيم
best
COOL!
0:30 got me good, damn.
hellow bro code we need a video like how they connect front end website to back end using python give a full clarification as well as make a video that would really help for us
These are always so low key funny.
11:08 we can write the power as raidius**2 ? i tried it worked .
I have always believed that education is the ultimate code to crack. Thanks to Bro Code, I have been able to unlock some of the most complex programming languages and computer science concepts with ease. Your videos have been instrumental in helping me level up my skills. So, from the bottom of my heart (and stack), thank you for being the best educational channel out there. Keep up the good work, Bro Code! Your dedication to educating the masses about programming languages and computer science has been truly inspiring. I would love to connect with you and learn more about your journey and how you became one of the best educational channels out there. again, thank you for being a constant source of knowledge and inspiration for us all. You're the real MVP, Most Valuable Programmer
Stop copy pasting
Robotic ass mf 🤖🤖🤖🤖🤖
love you bro
Thumbnail is so true
Bro: "Currently you have 0 friends"
That hit way too hard
Bro how to use trigonometrical equation in python
Bro or Sir please upload REACTJS full course
so when doing the exercises I stopped and just did the whole code ahead and then if I had issues I would unpause and watch if I couldnt trouble shoot.
on 3rd exercise I got the same output but my code for finding c was different.
A = 3
B = 4
c = math.sqrt(a**2 + b**2)
OUTPUT: C = 5
Is there a situation where using math.sqrt (pow() + pow()) is better or is it just good practice?
I coded ahed too and I used (pow() + pow()) just for practice and remembering the function.
I think its just good for practice if you want to remember differnt math functions
🧡🧡🧡
import math
Base=float(input("Enter the measurement of base:"))
Perpendicular=float(input("Enter the measurement of perpendicular:"))
hypotenuse = math.sqrt( pow(Base,2)+pow(Perpendicular,2))
print(f"The hypotenuse of the triangle is: {hypotenuse}")
Ceil (up by 1) vs floor (down by 1):
x = 3.72246
y = 4
z = 5
print(x.__floor__())
3
x = 3.12246
y = 4
z = 5
print(x.__ceil__())
4
699k subs, nice
import math
a = float(input("Enter a:"))
b = float(input("Enter b:"))
c = math.sqrt(pow(a, 2) + pow(b, 2))
print(f"c is: {c}")
Enter a:3
Enter b:4
c is: 5.0
hi can you explain pid?
tip = if you dont want to type the modul all the time you can import all its content by "from math import *"
no code this time???! can you paste it pls?
x = 3.12246
y = 4
print(round(x, 4))
3.1225
at 5:51 we can write it as pow(y, 3)
right?
Yes
import math
a = float(input("Enter value for side A: "))
b = float(input("Enter value for side B: "))
c = math.sqrt((a**2) + (b**2))
print(f"The hypotenuse, or C, is equal to: {round(c, 2)}cm")
This is how I did this one before watching it through, it still works but it seems like extra steps?
sorry if this is a dumb question but what is "side a"?
W thumbnail
you didnt have to roast me like that
You already made a full python course. Why do you make this tutorial? Btw Keep up the good work!!
He is updating the playlist with new good videos about the same, check "Python tutorial for beginners" playlist.
@@soyozzz ok
I haven't completed that course yet so I'm not sure if there's exercises at the end of it. This tutorial has exercises which are helpful too.
I have -2 friends yes
better look 😎
print(f"The area of the circle is: {round(area, 2)} cm\u00b2")
are fundraiser videos not recommended? I don't see your videos from my subscriptions.
10:29
what about floor division??
what about ghost division??
2:38 continue
Edit:done!
im crying while watching
Bro the thumbnail💀
Your channel is interesting but too fast so it's difficult to catch up to what you are teaching. i wish it was taught a little simpler and slower
late response but you can always play the video in ,75% speed or just pause the video to soak in what you just learned
+999999999 aura
1:29 out of context 💀
And then it's followed up by 1:39.
2:20 😭