likes = 9999 #All ways to print in console in python
print(f"A like if you love learning python with grepper. Likes:{likes}")
#or
print("A like if you love learning python with grepper. Likes:" + likes)
#or
print("A like if you love learning python with grepper. Likes:", likes)
# Printing, the basics of Python...
# Btw this is how you print a statement or anything in the terminal/console.
print("your printing statement")
# Above basically makes use of a built-in function called print which just
# shows your writing in the console. You can print variables also using print.
# Very easy to use. Hope I helped. Thanks!
# By Codexel (yea, i changed my username AGAIN...)
'''
print()inside the parentheses put a single colon or double colon
'''
# example like this
print("this how you use print statement")
# or like this
print('other way to print in python')
#please use the print keyword
print()
#pleease enter the value to print
print(1)
# if integers means you can use without single quotes or double quotes or triple quotes
print("nidhsih")
#one of the advantage of python you didn't want to use semi-colon in the end of the statements
# How to print in Python
print("Hello World!")
# How to print multiple words using comma separator
print("Hi", "there")
# How to separate the objects if there is more than one.
print("Chelsea","Liverpool", sep="-vs-")
#Specify what to print at the end. Default is '
'
print("Hello World",end="!")
# or use empty string "" for no new line
print("Hello World",end="")
#('') a string, to indicate it is a string you can use ("") or ('')
print("hello world")
#a integer
print(19)
# a float:
print(4.5)
# a bool:
print (True)
print (False)
#printing inputs
print(input("whatever u want to say "))
#or u can use preloaded inputs
input_value=input("whatever u want to say ")
print(input_value)
print("Type you'r string here!")
# String is something that is in 2 of "" this is called string
# Print function runs the function to print text in python
# You type print() first
# Give it "" double quotes
# Type whatver you want to print in that double qoutes
Python:
#Variables
action = 'vote a like'
goodbyeMessage = 'Goodbye!'
#Prints:
print('Welcome to a game!')
print('Do not forget to ', action + ', alright?')
print(str(goodbyeMessage))
JavaScript:
'Variables:'
var a = 'Hello again!'
var b = '!'
'Prints(logs):'
console.log('Hi!')
console.log(a)
console.log('Hello' + b)
2 + 1
#Addition is done by Python, but doesn't show us the answer
print(2 - 1)
#output - 1 (This will solve and show us the answer, 2,1 and 3 all are integers)
x = 2 * 1
print(x)
#output - 2 (We have printed the varible and got the answer, all are integers)
x = 2
y = 1
print(x / y)
#output - 2.0 (When division is done answer is given as a float)
x = "2"
y = "1"
print(x + y)
#output - 21 (When two strings are added, it concatenate and the answer
# is also a string)