Python or not? please any information would do.
posted to Ask by bion0

There really isnt any 'beginner'-language, though some may be easier to 'comprehend' than others. A good tutorial should guide you through those regardless. Python is just as good a choice to start with as java, javascript, ruby, c++, c#, or any other big language, simply because their popularity means you can find loads and loads of support all over the internet.
The only reason why html+css+javascript would be a slightly better thing to start with is if youre planning to build websites like the ones you browse regularly. But even then, youre not making a wrong choice by starting with any other big language (python included).
The most important thing is that you start with something, anything, thats popular so you have an abundance of people who could help you. Happy coding!

Basic Checkerboard Problem
posted to Ask by ColeAmodeo

You need to use a different variable for the checkers iterator than you use for the other 2 iterators. At the moment, you're changing the i from checkers with the iterators from oddWidth and evenWidth, since they are nested.

Also, when ran like that you'll notice your next issue: line1 and line2 don't flush with each height. You'll have to reset them with every iteration of checkers.

Alternative to code academy
posted to Ask

@theangryepicbanana it has changed. I just found out last week you can only learn python 2 for free, but python 3 became paid (I learned py3 for free but half a year earlier).
I can second sololearn though. It even has an app which is pretty good in how it solves the coding-in-an-interpreter-problem.

introduction to statistical learning & python
posted to Ask by frwqymn

I cant speak from experience with panda, but you could check out scipy, which contains panda, numpy and more. If youre going to make graphs, you may need matplotlib, but I dont know what that introduction to statistics will include.

Self-writing code
posted to Ask by mcko7304

We bow to our near-omnipotent intelligent robot overlords

problems with executing code in Python program
posted to Ask by SviatoslavDevdi

An IndentationError is related to how python 'understands' your code. When you write something that goes 'a layer deeper' (like a function or a for loop), you use the colon symbol and have to start the next line with an indentation. This indentation has to be consistently the same length (like always 1 tab or always 4 spaces or something). If you copied and pasted it into a .py file and ran it, this error would mean there's an inconsistency somewhere. The error will give you a number at while line the error occurred (e.g.: l123 or r123).

The SyntaxError means there's syntax python doesn't understand. This could be because there's a typo in a command (e.g.: pirnt(x) instead of print(x)) or a missing piece of the 'sentence' (e.g.: print)x) or for i in bananas,).

If you directly pasted it into the python command line instead of pasting it in a .py file and running that with the command line, that might also cause these issues. In general, you'll always make programs in a .py file and run that instead of typing the program directly in the command prompt.

Function print output
posted to Ask by Woloszin

Change print(i, end="") to print(i, end="", flush=True) to prevent python from buffering each letter.

FileNotFoundError
posted to Ask by rshea

Since repl is online, it looks up the file path on the server it runs on (or something to that effect). For as far as I know, you cant actually modify files on your local machine. After all, if that was possible, wouldn't people be able to modify any and all files on your computer, including system files?
Yea, I rather not have that functionality hehe

I think you can still do stuff with cookies on python, so that might be a solution.

My IF Statement ain't working cheif
posted to Ask by MaxwellHansen

Can you post a link to your repl for the full code?

need to know to use counter in while loop in the program
posted to Ask by OsamaAyub

Could you formulate your question better and either put your code into triple backticks for code block or into a repl which link you can share here. It makes jt so much easier to help you.

How to Create A chatRoom
posted to Ask by JamesJC1922

https://socket.io/get-started/chat
(just an example, if you code in js/node)

Why does the multiplayer link change?
posted to Ask by ThomasWeaver

Ypu mean you want to use collaborative coding? Then you need to be an explorer. You can enable this is your settings under account - > roles

python code error
posted to Ask by duncodubs

Better yet, post a link to your repl so we can easily see the whole thing and are better able to spot the source of the problem.

why it doen'nt show result
posted to Ask by moinashrafi

It ahows results for me. However, there are no grades being printed for anything below 40%. Furthermore, it would be clearer to use elif i stead of a separate else and if. Even clearer would be to only check if a percentage is higher and put a break at every check.

Hey everyone! It's me again
posted to Ask by FARHEENPALAGIRI

Since you want to calculate for each classroom separately, you should put the input results in a list and loop over it. For each value, use math.ceil as you did and add the result to the total. Its very close to what you already had, just looped and in a slightly different order :)

Is there any way to fill the rest of the page. So, that the new info pops up when I scroll down.
posted to Ask by frdobagins

@frdobagins Here's some code that will set a div to the height of the window:

<html>
<body onload="setHeight()">

<div id="babyGetHigher"></div>

<script>
function setHeight() {
	var height = window.innerHeight;
	document.getElementById("babyGetHigher").style.height = height;
}
</script>

</body>
</html>
Is there any way to fill the rest of the page. So, that the new info pops up when I scroll down.
posted to Ask by frdobagins

@frdobagins The only way to get the dimensions of the window is through JavaScript (window.innerHeight). This is not very difficult, but does require you to go beyond HTML and CSS. However, I can assure you JavaScript is widely used in web development and I'm sure you're going to use it plenty if you want to make more websites.

Is there any way to fill the rest of the page. So, that the new info pops up when I scroll down.
posted to Ask by frdobagins

Not sure what needs to pop up, but if you need to get something down, you can put it below an empty div and give that div a certain height.

CodeJam4 Results
posted to Announcements by Mosrod

I got points? O.o
Mine was a concept at best I feel. Regardless, I learned some new tricks thanks to some guidance from elias :)
Hopefully I'll sit down for it again in the near future to fix it with a clear head.

Congratulations to the winner and well done to all who participated!

How can i solve it
posted to Ask by TZLALA

Such problems are best tackled by breaking them up into their components. In this case the components are:
-checking it the string is empty
-returning 0 if thats true
-splitting the string in into individual characters
-converting (casting) each character into an integer
-adding each integer up to a single variable
-returning the single variable that contains the answer

This may seem like a lot, but if you google for the keywords of each component (with the name of your programming language to get results about coding in that specific language), youll see that theres already a functionality for it (and how to use it) or someone who had the exact same problem and someone else found a solution for it (on sites/forums like stackexchange).
See how far you can get and if you cant figure out a particular piece, feel free to ask!

PS: I deliberately didn't give you the answer, because you'll start to notice it's way more rewarding to come up with the answer yourself. The sooner you get that feeling that you solved a problem with your own 2 brain halves, the more you'll enjoy programming and the more creative you become ;)

Python chat
posted to Ask by vrony
if (userSays == "Hello"):
    print("Computer: Hello, world!")

userSays can be anything, it's just an example of how to write what are called conditions (see: https://www.w3schools.com/python/python_conditions.asp)

Java Console Monster Game
posted to Share by AndrewSalcedo

You're missing a closing bracket at the end of line 154 ;)

What do I learned python basics?
posted to Ask by YvngBashit

Its ok if youre struggling with the syntax sometimes. Nobody fully remembers all the syntax of whatever language they use. Even experts google the correct syntax if they dont know something off the top of their head. If youve learned the basics through a decent tutorial (like codecademy or tutorialspoint), I would personally recommend you start a very simple project that uses what youve learned and perhaps 1 or 2 things youre not entitely sure how to do them yet. This way youll start te get comfortable with using what you learned and keep learning as you code at the same time.
Do remember: if you notice youre struggling a lot or youre spending hours trying to solve a part of your program, it may be that you overshot on your goal. If so, just leave that part for now or cut it from your project if you can and focus on a part thats simpler. This way youll adjust the 'difficulty level' for yourself so you wont start getting frustrated and quit. Its very important to accept that everyone has limits to what they can do with their current level of experience. The better you recognize this, the better and faster youll improve!

I need help
posted to Ask by JakubWiewiora

We really cant help you if you dont tell us what you need help with. Let us know what doesnt work, what you want it to do, and a link to your repl (if its a coding problem)

Printing out a word array
posted to Ask by jessberr
	//add words to array
	favorites.forEach(word => {
    	console.log('ice cream', 'mashed potatoes', 'coffee')
  	});

This code does not add these words to the array like the comment says. If you want to add something to the array, use .push(). For example: favorites.push('ice cream').

Check for Syntax Errors
posted to Ask by IanRiley1

In a repl, go to settings on the lefthand side, scroll down, and set code intelligence to enabled. Hopefully this is what you're looking for. I'm not sure how detailed it is though.

Help with coding
posted to Ask by SamCarr

There are a few things I noticed when running your code.

1) You have written your JavaScript code twice. You can keep your HTML and JavaScript code in separate files (index.html and index.js) to make your code more readable, which really helps. Just put <script src="index.js"></script> in your index.html file and it will run everything in index.js as if you put it in <script> tags.

2) Probably the problem you wanted help with: your if-statements need to be used a little 'dumber'. The computer isn't as smart as to interpret if ("Age of <30") as "if the answer to the prompt is a number that's less than 30". Basically, an if-statement always checks if the result of whatever is between the brackets is TRUE of FALSE. This is nearly always done by making comparisons. For example: if(1 < 2), if(theAnswerToUniverse === "pie"), or if(replIsCool === true).
I assume you want to check if the answer to the prompts is one of these texts. In order to do that, you first have to store the answer someone gives as a variable. So instead of prompt("How old are you?"), you make it var ageAnswer = prompt("How old are you?").
This is where something a little tricky happens: when someone answers this question, they will probably answer with a number. But it's not stored as an integer at all! It's actually stored as a string. We could check for every string possible, but that would drive us crazy and make horribly long code. Instead, we convert the string to a number by using ageAnswer = parseInt(ageAnswer). Now, you can start comparing! if ("Age of <30") becomes if (ageAnswer < 30).
So what we did, step by step is: we prompted the user for input, stored it in the variable ageAnswer, converted (parsed) the string answer to an integer so we can compare it, and used an if-statement to make a judgement about it.
You can use something similar for the other prompts, except you give them their own variables (for example: genderAnswer or riskAnswer), you don't need to parse them, and you can compare them in the if-statement using if(genderAnswer === "male") or if(riskAnswer === "high risk").

Once you have this under control, you can try thinking about what you want to happen when someone answers something you didn't expect, like saying their age is "twenty" or their gender is "cow".
You're on your way to making a very neat form. Good luck!

look at how "funny" this code is
posted to Ask by CaseyLyons

Youll need to put a link to your repl before we can see it. And if you tagged a helper, what do you need help with?

Help Pls
posted to Ask by Malteaser

In order to change a variable outside a function from inside a function, you need to use 'global'. So (and apologies for not using a repl, Im on my phone):
lives = 3
def mastermind:
global lives -= 1

Mega sales
posted to Ask by RadhikaGupta1

mcuringa's solution is probably best, but what you were probably aiming for was:
if money > 10 and money <= 20:

Note the 'and' keyword and the fact that we compare 20 to money again (in a second condition, the variable is not implied; it needs to be stated again, because computers just aren't as smart as people when it comes to this :P)