New course!
Every coder should learn
Generative AI!
Try a free lesson
Courses
Courses
Code Compiler
Code Compiler
Discuss
Get Pro
Teams
Log in
Register
Menu
Q&A Discussions
Search
Search
Ask a question
Ask a question
Why is it necessary to close the file?
files
python
1 Vote
4 Answers
13th Feb 2016, 3:50 PM
Nicolás Tomatis
Why use elif if you can use if and get same result?
else-statements
python
0 Votes
4 Answers
11th Feb 2016, 9:08 PM
Luis Daniel Oliveira
Why would you want \n in your output?
python
strings
0 Votes
2 Answers
8th Feb 2016, 10:05 PM
Elena
Why main class should always be static?
java
static
3 Votes
4 Answers
8th Feb 2016, 9:22 PM
Khurshid wali
Why #include <iostream> instead of #include<stdio.h>?
c++
0 Votes
2 Answers
7th Feb 2016, 1:05 PM
ali khan
Why is the output of this code "no"?
operator-precedence
python
1 Vote
4 Answers
6th Feb 2016, 8:04 PM
Muhseen I. Abdullah
Can anyone explain why I need to create a constructor at all when I can just make an regular object and do the same things?
constructors
java
0 Votes
2 Answers
4th Feb 2016, 2:11 PM
Syed Ruman
Why would someone want to set the display of an element to none?
css
display
1 Vote
2 Answers
3rd Feb 2016, 5:26 PM
Stefan Farier
Why would you include a "normal" or "none" value into your css, since it changes nothing?
css
text
2 Votes
2 Answers
31st Jan 2016, 1:47 PM
Romy van der Kolk
Could someone explain me please, why is useful a pointer to a class' object, if I can simply use the name of the object in the class?
c++
classes
pointers
1 Vote
4 Answers
30th Jan 2016, 4:33 PM
Matias Beraldo Fernandez
Why IDs cannot use more than once on a page?
css
selectors
2 Votes
3 Answers
30th Jan 2016, 10:12 AM
Nuwan Thisara
Why is it List<integer> list = new ArrayList();? shouldnt the first one be ArrayList instead of List?
java
lists
0 Votes
4 Answers
28th Jan 2016, 10:19 PM
Branko Nešić
Why is there a semicolon and the braces after " Machine m1 = new Machine()" ?
anonymous-classes
java
0 Votes
2 Answers
27th Jan 2016, 3:04 PM
Dalia Ahmed
Why 9 >= 9.0? Anyone tell me why?
booleans
python
1 Vote
5 Answers
26th Jan 2016, 12:29 AM
zhihuai
Any particular reason why you wouldn't just keep everything public?
access-modifiers
java
1 Vote
6 Answers
22nd Jan 2016, 10:38 PM
Hamza
Why should i type public before constructor? can i create a constructor without public?
constructors
java
0 Votes
2 Answers
14th Jan 2016, 12:04 PM
JulietLove
I don't understand the function of the min and max-width. Why do I have to use them when I can just specify the width?
css
height
width
3 Votes
4 Answers
14th Jan 2016, 9:26 AM
Samuel Blessed Woniowei
Why would you need to use the not operator?
c++
operators
0 Votes
2 Answers
7th Jan 2016, 6:12 AM
Jackson
Can someone please explain me why the "-1" in this line "max_index = len(words) - 1"
loops
python
3 Votes
2 Answers
3rd Jan 2016, 11:49 PM
Diogo Vilaça
If a template type can take any data type, why would we need multiple template types? Why not just make one template type and use it for everything?
c++
templates
2 Votes
1 Answer
3rd Jan 2016, 6:26 PM
Taylor Street
If a pointer is supposed to be passed, why is the friend function's argument (MyClass &obj), not (MyClass *obj) ?
c++
classes
friend
2 Votes
3 Answers
3rd Jan 2016, 2:01 PM
Tesik
hi guys can anyone tell me what is the use of namespace with an example and why only namespace std not namespace cout and how I know which type of namespace s are used writing an program?
c++
2 Votes
3 Answers
1st Jan 2016, 1:53 AM
sivasaiprakash
Why would İ prefer to use a variable rather than a constant?
c++
constants
0 Votes
6 Answers
29th Dec 2015, 6:25 PM
Kevin Kiambe
numbers = list(range(3, 8)) print(numbers) >>> [3, 4, 5, 6, 7] ... Why is 8 not included there if its a part of the range, yet 3 is included in there?
python
range
5 Votes
5 Answers
27th Dec 2015, 12:18 AM
Jorge Montiel
Why use primary key?
sql
0 Votes
3 Answers
25th Dec 2015, 9:57 AM
Dileep kumar
Why would you need to use multiple "<<" in one cout line?
c++
cout
0 Votes
4 Answers
24th Dec 2015, 8:45 PM
Jason Elkins
I can't understand, why do sin(x) and tan(x) return wrong values when I put Math.PI as x. It shows 1,22 for sin and -1,22 for tan, when it should be 0 in both cases?
javascript
math
1 Vote
3 Answers
24th Dec 2015, 12:51 AM
astar95
"7" + 1 should be 71 Why Python occur an exception?
exceptions
python
1 Vote
7 Answers
17th Dec 2015, 12:35 PM
Mahmud Al Hakim
Why the ans is just three?
if-statements
python
4 Votes
11 Answers
17th Dec 2015, 5:02 AM
raj karnik
Why recursion does not occur, when I assign a value to a property within its own didSet observe?
properties
swift
2 Votes
1 Answer
16th Dec 2015, 12:46 PM
Lilit d'Khachatryan
Why do people never use PHP anymore?
php
0 Votes
3 Answers
15th Dec 2015, 5:35 PM
CakeWut
Why should we use '&&' and '||' operator while they works same as 'and' and 'or'? Someone please explain
operators
php
4 Votes
11 Answers
14th Dec 2015, 2:18 AM
The Most Mysterious
Why do we need css and how does it help. Only expert answer is preferred.
css
0 Votes
3 Answers
9th Dec 2015, 5:26 PM
Ayushi Sangotra
Why we start the index of array from 0?
arrays
c++
0 Votes
2 Answers
6th Dec 2015, 6:38 PM
PRIYANKA YAWALKAR
Why is width="100" and width="100%" not the same?
html
width
4 Votes
18 Answers
4th Dec 2015, 1:25 PM
Evans Ibok
Why 26 // 5 / 2 = 2.5 ? I dont understand it :(
numeric-operations
python
0 Votes
2 Answers
1st Dec 2015, 9:25 PM
Michal
Why a lambda function would ever be more useful than a normal function.. Can somebody explain?
lambdas
python
6 Votes
10 Answers
17th Nov 2015, 12:28 PM
Max Werman
Why break doesn't have an end tag?
html
0 Votes
2 Answers
13th Nov 2015, 11:11 PM
Christian
Can someoneone explain what is going on in the >>>print (things[2][2])? Why does it output 3?
lists
python
4 Votes
12 Answers
24th Oct 2015, 11:07 PM
Kota
Why bother with the return of a variable that never gets document.write?
functions
javascript
0 Votes
2 Answers
9th Oct 2015, 5:32 AM
aaron urban
I need to know why we need to set the environment path?
java
jdk
0 Votes
7 Answers
26th Sep 2015, 1:34 AM
Anup Jaguri
Can someone tell me why are they using " p .italic" and not just ". italic"?
css
font
0 Votes
3 Answers
24th Sep 2015, 8:01 PM
Jose Figueroa
Why we write <hr\> not like </hr>?
html
-4 Votes
17 Answers
6th Sep 2015, 5:18 AM
Praddhyumn Mani
I want to know why make classes? if you can simply make methods in the main class?
classes
java
0 Votes
2 Answers
4th Sep 2015, 11:20 AM
miguel coy
Why is the "!" used for the comments? What does it mean?
comments
html
1 Vote
6 Answers
28th Jul 2015, 5:51 AM
Gabrielle Do
Why should we write audio file is not supported by browser?
audio
html
html5
0 Votes
5 Answers
11th Jul 2015, 9:22 AM
yoganand konda
I wonder why those complementary languages (HTML, CSS, Javascript) have different ways of commenting. They could have made it simple! :)
comments
css
html
javascript
2 Votes
3 Answers
3rd Jul 2015, 12:19 PM
Milos Ivanis
Still don't get the difference between class and id (not in terms of syntax, but why should i use one instead of another)
css
selectors
5 Votes
23 Answers
28th May 2015, 11:15 AM
Marcelle
I don't understand the "void" function and why a method should have it or why not have it?
java
methods
1 Vote
7 Answers
17th May 2015, 9:34 PM
Leslee
Why html is not programming language?
html
html5
1 Vote
5 Answers
26th Apr 2015, 9:49 PM
alaa mahmood
Ask a question
Ask a question
Ask a question
Ask a question
< Previous
1
...
449
450
451
Next >
Hot today
Is the AI course worth the $49?
0 Votes
Notifications
5 Votes
Can anyone please help with this below code for python files
1 Votes
How private are "private" code snippets in Sololearn really?
1 Votes
Where to use
0 Votes
Should I always mention name attribute inside <input type="" id="" name="" > ??
0 Votes
Scroll to bottom of page in Selenium with browser minimized
0 Votes
Coding path
0 Votes
Blank screen when trying to but AI course on Apple 15 I phone,
0 Votes
How to win bits
1 Votes