MOST Get This Wrong!! #python #programming #coding

preview_player
Показать описание
This video is an explanation of a community post poll I posted a couple days ago in which most people got it wrong.

Background Music:
Attribution 4.0 International (CC BY 4.0)
Рекомендации по теме
Комментарии
Автор

Makes sense, the fact that it is a negative completely messed with everyone.

imma
Автор

Damn, ya I rounded -3.5 to -3 as I didn't even think that that would technically be rounding up

Gwizz
Автор

That's such an inconsistent design in Python. I expected it to be like the division in C/C++. Rounding to floor value is sure to cause a heck of problems in indexing and searching.

k_gold
Автор

I had no idea // floored the answer in python. I thought it truncated the decimals like in C and C++

mr.government
Автор

I accidently used Florida vision on line 3 and now my code just outputs 8080808 and plays club beats.

FlightPlanBravo
Автор

It annoys me immensely that a//-b =/= -(a//b) ...
STOP BREAKING MATH PYTHON xD

gqitbxo
Автор

I got it right for the wrong reason. When I read the third line, I was thinking of round(), which rounds n.5 to the nearest even number. That would give -4 in this case, but not in a case where the nearest number towards negative infinity is an odd number.

SmashPortal
Автор

Please tell me how do you print the expression result inline. It will make my day!

elatedbento
Автор

I don't understand why the result here was rounded up and the result in the santa code was trunked. Even Chat GPT is confusing and don't know why it is happening.

DanillO_o
Автор

Hey amazing work . But when I pause the video to solve the question line 1 is blocked 🚫 can’t read can you pls start your cod from line 2 or 3 so it’s more readable while I pause the short 🎉

luvgupta
Автор

I didn't even notice that the / was doubled

nightspicer
Автор

Idk floor meant towards negative infinity, cool

sobbski
Автор

hey, what's this visual studio code theme named?

DarkensStuff
Автор

Honestly my brain went to solving it as 7 || -2 (7 or -2) and doing bit math, apparently my computer organization class really did a number on me 😂

happiestgameinexistence
Автор

What does the round function do exactly

pororo
Автор

May i ask if the part y is -round( 456), don't have the ". " on the number. Does it means the ans is -4 ??

lydiangieng
Автор

Actually it is very stupid. // shoud works in the same way as integer dividing in C/C++... because that's the only reason why // exists

CZPRK
Автор

7//-2 well 7/2 is 3.5, so -3.5 floored is -4, so -4? (prevideo guess)

Yep gottem, the floor thing is very important for negative numbers because I couldn't figure out this bug with a Base-X calculator

Uncreeperble
Автор

I don't get it. You say the indexing starts at zero, but the sixth index is seven. Am I missing the definition of what index means with python? Because it was my understanding that the sixth would be five, not seven. Please help me understand this

kisaknight
Автор

Uhh, I got the right answer with the wrong formula.. lol, I was still correct! XD

airline
welcome to shbcf.ru