#Program with an output
print("Hello World")
Hello World
#Program with an input and output5
greeting = input("Provide a greeting: ")
name = input("Provide a name: ")
print(greeting + " " + name)
hi fella kaiyigga
#Program with a List
fruits = ["Apple", "Banana", "Grape", "Watermelon", "Cherry", "Strawberry", "Blueberry"]
for fruit in fruits:
    print(fruit)
Apple
Banana
Grape
Watermelon
Cherry
Strawberry
Blueberry
#Program with a Dictionary
student = {"name": "Kaiyu", "age": 16, "grade": "C"}
print("Name:", student["name"])
print("Age:", student["age"])
print("Grade:", student["grade"])
Name: Kaiyu
Age: 16
Grade: C
#Program with an Iteration
s = ""
for i in range(1,10):
    s += str(i) + ""
    print(s)
1
12
123
1234
12345
123456
1234567
12345678
123456789
#Program with a Function to perform mathematical and/or a statistical calculations
def add_numbers(a, b):
    return a + b
def subtract_numbers(a, b):
    return a - b
def multiply_numbers(a, b):
    return a * b
def divide_numbers(a, b):
    if b == 0:
        return "Error: Division by zero is not allowed."
    return a / b
num1 = float(input("Enter the first number: "))
num2 = float(input("Enter the second number: "))
operation = input("Choose operation (+ for addition, - for subtraction, * for multiplication, / for division): ")
if operation == '+':
    result = add_numbers(num1, num2)
    operation_symbol = "addition"
elif operation == '-':
    result = subtract_numbers(num1, num2)
    operation_symbol = "subtraction"
elif operation == '*':
    result = multiply_numbers(num1, num2)
    operation_symbol = "multiplication"
elif operation == '/':
    result = divide_numbers(num1, num2)
    operation_symbol = "division"
else:
    result = "Invalid operation"
    operation_symbol = ""
if operation_symbol:
    print(f"{num1} {operation} {num2} = {result} (Operation: {operation_symbol})")
else:
    print(result)
5.0 - 5.0 = 0.0 (Operation: subtraction)
#Program with a Conditional
grade = int(input("Input your grade %"))
if grade >= 90:
    print("You have an A")
elif grade >= 80:
    print("You have a B")
elif grade >= 70:
    print("You have a C")
elif grade >= 60:
    print("You have a D")
else:
    print("You have an F")
You have an A
# Program with Purpose
weightInPounds = input("Input the weight in pounds: ")
weightInKilograms = float(weightInPounds) / 2.205
roundedWeightInKilograms = round(weightInKilograms, 2)
print("The weight in kilograms is " + str(roundedWeightInKilograms))
The weight in kilograms is 226.76