pythonCopy code
print("Hello, World!")
pythonCopy code
python hello_world.py
pythonCopy code
x = 5
y = "Hello"
pythonCopy code
if x > 10:
print("x is greater than 10")
else:
print("x is less than or equal to 10")
pythonCopy code
fruits = ["apple", "banana", "cherry"]
for fruit in fruits:
print(fruit)
pythonCopy code
def add_numbers(x, y):
result = x + y
return result
sum = add_numbers(3, 4)
print(sum)
pythonCopy code
import math
result = math.sqrt(25)
print(result)