Learning Python with a background in JS

JS => roundOfApplause
Python => round_of_applause
print("Hello World!")
greeting = "Hello World!"
print(greeting)
greeting = "Hello World!"
print(greeting)
greeting = "Goodnight Moon"
print(greeting)
Hello World!
Goodnight Moon
JS     => function sayHi(){
return "HELLO!!!"
{
console.log(sayHI())Python => def say_hi():
return "HELLO!!!"
print(say_hi())
def say_hi(name):
return "Hello " + name
print(say_hi("Bob"))
print(say_hi("Jon"))
print(say_hi("Tina"))
output =Hello Bob
Hello Jon
Hello Tina

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store