Alex likes to create a bunch of Number Theory problems. Well, here I go with my series! Please like and share (because Finn Hulse likes it when you share and like)
Alex is fairly new to computer programming, and he wants to learn Python. After 51 days of hard work and 8 days spent trying to debug (see what I did there?), he finally created a program as follows:
1 |
|
But it still doesn't run! What happened? What got wrong?
For other language programmers: I don't use Python too, but since it's recommended in Brilliant for Computer Science topics to use this, I used it for this problem. print is the same as printf(), NSLog(), System.out.println(), cout <<, PRINT, etc... Semicolons aren't required. That should tell you enough (I hope)
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The double-quotes match the one that started Oceanview. The compiler would interpret two different strings with a random unspecified variable name. The correct way would be to escape the characters by doing \".