# h2.py # Input name. name = input("What is your name? ") # Input a string. s = input("Please enter a string: ") # pring result print() print(f"Hi, {name}.") print(f"For the string: '{s}'") print(f" length of the string: {len(s)}") print(f" in upper case: {s.upper()}") print(f" in lower case: {s.lower()}") print(f" with first character capitalized: {s.capitalize()}") print(f" with first character of each word capitalized: {s.title()}") print() # Get input from the user num1 = int(input("Enter an integer: ")) num2 = int(input("Enter another integer: ")) # Perform some operations addition = num1 + num2 subtraction = num1 - num2 multiplication = num1 * num2 # Print results print() print(f"Hi, {name}.") print(f"For the numbers: {num1} and {num2}") print(f" Addition: {addition}") print(f" Subtraction: {subtraction}") print(f" Multiplication: {multiplication}")