print % in python code example

Example 1: how to print something in python

print("whatever you want to print")

Example 2: python print

# This is a print statement
print("Hello, world!")

Example 3: how do you use a print statement in python

print("What you would like to print")

Example 4: print python

print('Hello, world!')

Example 5: how to print in python

#a string, to indicate it is a string you can use ("") or ('')
print("hello world")
#a integer 
print(19)
# a float:
print(4.5)

Example 6: print in python

# Print statements in python

# A usual print() statement looks like this:

print("Hello from the print statement!")

#   A print statement starts with print( , as it is a built-in function

# It contains any given value that can be printed to the console. (ex. "Hello!")

# It ends with a closed bracket

# A few more examples:


name = input("Enter a name :\n") # asks for a name
print(f"Your name is {name}") # Your name is <whatever name you entered>

print(1 + 2) # 3

print(not True and not False) # False