New answers tagged

0

For the sake of completeness, you could also do: from cs50 import get_int h = get_int("Height: ") But directly importing functions (or classes, etc) from a module is not recommended. It'll pollute your global namespace, and soon you'll have no idea where a given function came from. It's much better to stick to importing modules only and using ...


0

range(height) For a value of 4 as shown, will give [0, 1, 2, 3]. So the first iteration will print (3 - 0) spaces and 0 blocks.


0

I think you should re-think the whole concept of counting likes. I am really just a newbie but I think it's really, really bad idea getting number from document.querySelector('.count-${post_id}\').innerHTML;.. anybody can access developer mode in web browser and send any number to your server.. And if one user sees 10 likes leaves the page opened whole day ...


Top 50 recent answers are included