Dyskusje Q&A
I've been trying to make first example program work for about an hour now and I've re-typed it multiple times but it still gives me the same error
ExampleProgram.java:3: error: cannot find symbol
System.out.printIn("Hello World");
And the arrow is pointing at the period (.) after out. Anyone can help me?
0 głosów
7 odpowiedziIn the continue Loop -
i = 0
while True:
i = i +1
if i == 2:
print("Skipping 2")
continue
if i == 5:
print("Breaking")
break
print(i)
print("Finished")
It shows the output being
"1
Skipping 2
3
4
Breaking
Finished"
Why are the last three lines not
"Breaking
5
Finished"
Where it shows print(i) after break?
1 Głos
3 odpowiedziI was playing in the code playground after learning about the String.Concat in the static classes course. I have the following code, and was wondering if it's possible to put a period and space between the two texts, and how to put the second text on the next line.
http://www.sololearn.com/app/csharp/playground/c0rAVF6X3KwP/
-1 Głos
4 odpowiedziIs it possible to make my code run without having to press Enter on my IDE? For example: if I'm making a calculator and I want the calculations to be made as soon as I press "=" after typing the numbers and the operator?
Say I wanted to add two numbers: can it calculate automatically as soon as I write "2+3=" without having to press Enter?
0 głosów
5 odpowiedziWrite a java program that generates the binomial coefficients for (x +y)^14 prints them, separated by a comma and a space use a loop or loops to increment the integer n and k after they are initialized.
Hint:for the above problem the coefficients ate the 15th row of pascal triangle
0 głosów
2 odpowiedzidef add(x, y):
return x + y
def do_twice(func, x, y):
return func(func(x, y), func(x, y))
a = 5
b = 10
print(do_twice(add, a, b))
Please explain step by step
Which is caller here?
Explain the 3rd and 4th line ?
why in 4th line we write add(add(x,y),add(x,y)) which is function of 1st line ?
how can we write function after return statement insted of (x+y+x+y )=30?
0 głosów
2 odpowiedziPopularne dzisiaj
Help please?
4 Votes
Ejercicio Pytho
0 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
Game development
0 Votes
Ruby programming?
3 Votes