- 1

# Simple Operations

In the description they put 2+2 And the output is 4 but I don't get it am I supposed to only put the numbers or more than that cuz it DOSENT work for me

56 Respuestas

+ 7

Python: print(2+2)
Output 4
C: printf(2+2)
Output 4
C++: cout<<2+2;
Output 4

+ 6

1) if you just do just 2+2 python will just do calculations and will not show the result be ause you didn't ask to show .
2)You have to ask the python to show this result by the help of print and parenthesis means () these brackets
3) Like Example :-
print(2+2)
Like that python interpreter will know that it have to show that result in output window

+ 3

Python: print(2+2)
C++: cout << 2+2;

+ 1

Python: print(2+2)

+ 1

Python :print(2+2)

+ 1

For python write print(2+2)
and get output 4

0

Yep, only numbers so keep away from using double quotations

0

ruby : puts 2+2 output 4
puts "2+2" output 2+2

0

In python, space is key! So it would be print(2 + 2)

0

Python: print(2+2)

0

Python: Lets calculate the number
2+2

0

Python: print(2+2)

0

print(2+2)
output-4

0

We can write that in so many ways
Here are some examples 😉
a=2+2
print(a)
Another one ....
print(2+2)
can also give you the answer

0

Print ('2+2')

0

print(2+2)

0

22

0

Print (1(2)+1(2)) output-4

0

Your have to write:
print(2+2)