0

In this Print(x + 3),Print (x) means what?

Working with variables

3rd Sep 2021, 2:37 PM
Divyanshu Kumar
2 Respuestas
+ 1
Hard to tell with no info about variable <x> (its value). Although syntactically Python alike, I would rather recommend to tag a specific language. It helps to improve language context. https://code.sololearn.com/W3uiji9X28C1/?ref=app
3rd Sep 2021, 2:44 PM
Ipang
0
print(x + 3) Will give an error until you declare a variable like x = 5 print(x + 3) print(x) Will give the following output 8 5 The output is like that because we first declared a variable as x as 5 and then we just added it to 3 in second statement and after that we again printed a variable x but alone in brackets Well a pro tip don't add "string" or else's it will print("x + 3") It's output will be x + 3 Not 8 because we declared a string try to play with this on python playground Happy Coding!
3rd Sep 2021, 2:43 PM
<★Shaurya Chauhan★>
<★Shaurya Chauhan★> - avatar