Skip to content

Latest commit

 

History

History
73 lines (58 loc) · 827 Bytes

File metadata and controls

73 lines (58 loc) · 827 Bytes

Print

Write "print".

print

After that, add a pair of parentheses.

print()

If you want it to print a variable, type the variable inside the parentheses.

print()

If you want it to print a string, put a pair of quotation marks and inbetween that, add a string.

print("")

If you want to print text and then a variable, add quotation marks and add a comma and a variable.

print("Variable =",Variable)

Examples

Example 1:

var = 1
print(var)

Run:

1

Example 2:

var = "Surprise"
print(var)

Run:

Surprise

Example 3:

var = 1
print("Var equals",var)

Run:

Var equals 1

Example 4:

var = "Surprise"
print("Var equals",var)

Run:

Var equals Surprise