Courses
Courses
Code Compiler
Code Compiler
Discuss
Teams
Log in
Register
Menu
Q&A Discussions
Search
Search
Ask a question
Ask a question
How do i calculate something like this in python? (n*(n-1))/2= 1128 i.E. n is unknown. I can't do it like x = (n*(n-1))/2= 1128
calculate
math
please_help
python3
4 Votes
6 Answers
17th Sep 2017, 8:08 AM
Da Riebi
javascript
=
code?
const
is
of
output
square
the
this
what
-2 Votes
7 Answers
8th Jun 2019, 12:00 AM
Victoria Gredics
i don't understand this: for example : a=4 while a=4 print (a) a = a + 1 help me please! !!!!
python
0 Votes
6 Answers
6th Sep 2016, 12:36 PM
youssef
can an array be my variable name.eg, Var [hour, second, minutes] = [0, 0, 0]; pls explain this expression if it is correct.
javascript
2 Votes
3 Answers
13th Oct 2023, 10:00 PM
Temmy
Float * int (mistake): a=179*1.13 print(a) Output = 202,269999999999999 But right answer is 202.27 What is the mistake in python???
python
0 Votes
5 Answers
18th Oct 2016, 9:40 AM
Konstantin Markov
import java.util.*; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System
java
-3 Votes
3 Answers
14th Dec 2020, 4:56 PM
ABDULLAHI AMINU
in python 3 ( egal is ==) , what about this one ( = ) what does it mean?
python3
-1 Vote
3 Answers
1st Jan 2022, 7:30 PM
Miso Bassoum
C++ Question logic doubt : I need to write a program to read and translate integers into numbers. e.g 856 = Eight five six
#beginner
#code
#cpp
#integer
#printnumber
#translateinteger
1 Vote
4 Answers
19th Jan 2021, 7:50 PM
Shay J
Hello, can someone help me to rank numbers. Example: input: a = [35, 26, 65, 15], output: [2nd, 3rd, 1st, 4th].
python
python3
ranking
0 Votes
3 Answers
2nd Mar 2020, 3:52 PM
Osei Kwadwo
#include <string> #include <iostream> using namespace std; int main() { string colour = "black" ; cout <<" chge"; return 0;}
c++
0 Votes
2 Answers
31st Jul 2018, 9:01 PM
Piyush Goyal
What is the error in this code
=
age
array<string>)
funmain(args:
readline()!!.toint()
var
0 Votes
4 Answers
17th Dec 2022, 5:07 PM
gafer alip
What is fault in it? I couldn't make to handle the event when touching the button😕
=
btn
document.getelementbyid(
function()
let
window.onload=
1 Vote
3 Answers
19th Nov 2022, 11:47 AM
Captain Thunder ⚡
Getting EOFE Error = EOF when reading a line. Can some one please look into this and guide how to resolve this?
error
0 Votes
4 Answers
3rd Feb 2022, 6:45 AM
Unnikrishnan K
def ModeratedMarks(marks, passMarks): if marks == passMarks-1 or marks == passMarks-2: marks = passMarks return marks def main
python
0 Votes
2 Answers
21st Feb 2022, 6:43 AM
Anushka Dwivedi
public class main { public static void main(String[] args) { Scanner scan = new Scanner(System.in) ; System.ou
java
-1 Vote
2 Answers
13th Jun 2021, 9:38 PM
Musaif
Tengo dudas en php
“eduardo”;
<?php
=
$name
-1 Vote
1 Answer
6th Oct 2018, 11:24 PM
Eduardo
#! python # huge list making nn=1000000 a = [] i=0 while i #! python # Using Lists as Stacks stack = [3, 4, 5] stack.append(6) stack.append(7) print stack x=stack.pop() print "popped ",x print stack x=stack.pop() print "popped ",x x=stack.pop() print "popped ",x print stack
python
0 Votes
5 Answers
20th Jul 2017, 2:04 PM
paul mwengei
In python when i type x = 4 X *=3 the x its 4 and X its 18 why didn't gotcha?
result
1 Vote
3 Answers
19th Nov 2018, 5:43 PM
Deekshant sharma
Final keyword in java what is that? in simple language is that make float and dubal variable fix value 5.7 = 5.7?
java
2 Votes
5 Answers
11th Jun 2017, 9:23 AM
prashant vyas
I am working on a code to calulate difference between sum of odd and even levels of a BST. Here I have used a statement s = s2;
c
stack
struct
0 Votes
13 Answers
1st Dec 2017, 3:41 AM
Ashutosh
what means an argument from a object be like this: thread ob = new thread(new A()); ???
java
threads
1 Vote
2 Answers
23rd Jul 2016, 9:53 AM
Gorick X
I wanna create array of method in JavaScript i.e. var molecule = new array Tmolecule any recommendations?
arrays
javascript
js
methods
0 Votes
2 Answers
15th Jan 2019, 7:44 AM
Amir Rafati
Не запускается программа.
.")
('')
=
enter.
input
input("\n\nhae
print
1 Vote
5 Answers
13th Jan 2020, 5:49 AM
Владимир
Given the string matric_no = "ND/20/COM/FT/500". Write a python range statement to display: i. Level ii. Year of study iii. Cour
python3
pythontutorial
0 Votes
4 Answers
4th May 2021, 6:45 PM
HORLATECH
Why repeated number are not printed in set? Does same thing happens in dictionary? nums = {1, 2, 1, 3, 1, 4, 5, 6} print(nums)
dictionaries
python
python3
sets
0 Votes
5 Answers
2nd Jul 2021, 9:06 AM
Zahed Shaikh
What does const query selector In my code do? And what does do that const calculator = new calculator line 100-156
css
html
java
javascript
script
what
0 Votes
3 Answers
5th Apr 2020, 6:39 PM
kaspars kaspars
Why does index= -1 inserts "java" at 2nd last position? (As generally index = -1 means end of list(
insert
lists
python
python3
0 Votes
3 Answers
9th Jun 2018, 12:57 PM
Sandeep Singh
If there any way to make x = 2 when i call the second f(arr)
sololearn
0 Votes
1 Answer
30th Oct 2019, 5:10 PM
Abdelrhman Albarbary
public class Program { public static void main(String[] args) { int[ ][ ] sample = { {1, 2, 3}, {4, 5, 6} };
arrays
java
2 Votes
5 Answers
25th Oct 2017, 11:56 AM
Hasrat Wadsariya
x = 1 while x < 10: if x%2 == 0: print(str(x) + "hallo") else: print(str(x) + "world") x += 1
help
2 Votes
2 Answers
15th Aug 2020, 2:46 AM
Hacker Tamil Tamila
#include <stdio.h> int main() { int x[5] = {20, 45, 16, 18, 22}; printf("The element is %d\n", x[5]); /* 32766 */
arrays
-2 Votes
3 Answers
23rd Jan 2022, 4:35 AM
Diya Mehta
What's the ouput of the following: f = None for i in range (5): with open("data.txt", "w") as f: if i > 2:
python
1 Vote
4 Answers
1st Jan 2021, 6:27 PM
JurgenV
int main() { int i=4; int ii=i*i; int iii = ii*i; cout <<iii/ii-i<<endl ; //Outputs 0 return 0; }
code
output
1 Vote
3 Answers
3rd Jul 2017, 10:09 AM
Kushagra Agarwal
Hello everyone, help me, I wrote this code.
(let
<
=
0;,
for
i
i
0 Votes
5 Answers
29th Aug 2020, 10:37 PM
Jasurbek Erkulov
<?php $names = array("John", "David", "Amy"); foreach ($names as $name) { echo $name.'<br />'; } ?>.
php
0 Votes
1 Answer
9th Aug 2019, 2:34 AM
Rajat Khatore
public class Program { public static void main(String[] args) { String[ ] myNames = newstring[5]; mystring[]={ "A", "B", "C", "D"}; System.out.println(myNames[2]); } }
arrays
java
1 Vote
6 Answers
15th Oct 2016, 12:17 AM
Pragathi M D
In this ex:- letters = ['p', 'q', 'r', 's', 'p', 'u'] print(letters.index('p')) why the ouput is 0 only we it is not 4
lists
0 Votes
4 Answers
7th Apr 2020, 7:38 AM
Mandadi Praveen Kumar
Fill in to get the value of the form field with id="name" and set it as the text of the paragraph with id="txt". var v = $("#na
answer
challenge
emergency
jquery
1 Vote
4 Answers
30th Sep 2019, 11:28 AM
Mayuresh Mhatre
int main () { for (int x = 1; x <= 10; x++) { cout << 1 + (rand() % 6) << endl; } }
rand
0 Votes
6 Answers
17th May 2020, 9:29 AM
Salini Selvam
public class Program { public static void main(String[] args) { int[ ] intArr = new int[5]; int[5]={1,2,3};
java
0 Votes
2 Answers
26th Jun 2017, 7:09 PM
gobiga rani
What if child class is not generic but parent class is generic in java. Then Child c = new Parent<String>(); is correct?
generic
java
wildcards
2 Votes
2 Answers
18th Oct 2019, 1:24 PM
Smit Kalkani
Tip Calculator When you go out to eat, you always tip 20% of the bill amount. But who’s got the time to calculate the right ti
#your
=
bill
code
goes
here
int(input())
-5 Votes
2 Answers
6th Feb 2021, 3:12 PM
Utkirbek Yuldoshev
In c++ when you want to use the sum value, you should put int sum = 0; first or just int sum;?
beginner
c++
help
1 Vote
2 Answers
6th Nov 2023, 7:11 PM
Magdalini
python program to Reverse words in a given String in Python example str = "Capgemini" output should be reverse of that string li
python
-2 Votes
6 Answers
13th Feb 2021, 10:57 AM
Suresh Suresh
What is the output of this code? class Temp { public int num = 2; public Temp() { num++;} ~Temp() { num++; } } static void
c#
1 Vote
3 Answers
30th Apr 2019, 2:07 PM
Smit Chawda
How to take the user input as a string and print the output as name = user input in java
java
0 Votes
2 Answers
26th Aug 2022, 3:56 AM
Sai Eshwar
Given the following declaration: char myStr[26]; char yourStr[26] = "Arrays and Strings"; a. Write a C++ statement that
pls
-2 Votes
2 Answers
8th Jul 2021, 5:55 AM
Tawajir Media
Complete the code to output "name is age years old", where name and age are the declared variable values. name = "James is"
print
0 Votes
3 Answers
3rd Jul 2022, 7:20 PM
Roshan Singh
how to assign a function to a variable?. For example y = f(x), where f is a polynomial
javascript
0 Votes
2 Answers
3rd Apr 2020, 9:37 PM
Rafael Snider Bastidas
Can someone help me please. I can understand the result of the cout << p << endl; #include <iostream> using namespace std; int main() { int x = 8; int *p; p = &x; cout << *p << endl; cout << p << endl; cout << &p; return 0; }
c++
1 Vote
6 Answers
16th Aug 2016, 4:07 PM
Attitude
Ask a question
Ask a question
Ask a question
Ask a question
< Previous
1
...
31
32
33
...
38
Next >
Hot today
Someone can help me
2 Votes
X velocity
0 Votes
Files not linking in C++
0 Votes
I am a super beginner
0 Votes
I want to make a triangle area calculator ,anybody can teach me
2 Votes
Web Dev
0 Votes
Img & web server or personal info
0 Votes
Pls give me an idea
1 Votes
How this program executes?
0 Votes
How to achieve "Sololearner" achievement?
0 Votes