Skip to content
Sign upLog in
← Back to Community

Variables

Profile icon
ofall007

Hello, everyone, My name is Omar 23 years old and I'm new to programming while I was learning and doing some practice I couldn't figure out how to fix it and the problem is how do I print a value without a variable? I tried to write the code in different ways looking up answers but cannot find any

Voters
Profile icon
ofall007
Comments
hotnewtop
Profile icon
MattDESTROYER

Can you specify what language you are using?

For example, in JavaScript, you can do:

console.log("string"); console.log(51.62); console.log(true); // etc (this is a comment)

Whereas in Python the exact same code becomes:

print("string") print(51.62) print(True) # etc (this is a comment)

Generally speaking, a print function in most languages will accept any value of any default type.