• Dec 24, 2025 •CodeCatch
0 likes • 1 view
string
• Sep 20, 2025 •cntt.dsc-f4b6
1 like • 2 views
print(123)
• Feb 23, 2025 •hasnaoui1
0 likes • 9 views
print("hello world")
• May 31, 2023 •CodeCatch
0 likes • 3 views
# Prompt user for base and height base = float(input("Enter the base of the triangle: ")) height = float(input("Enter the height of the triangle: ")) # Calculate the area area = (base * height) / 2 # Display the result print("The area of the triangle is:", area)
• Jul 2, 2025 •AustinLeath
0 likes • 2 views
import calendar from datetime import datetime # Get the UTC timestamp a = calendar.timegm(datetime.utcnow().utctimetuple()) print(a)
0 likes • 6 views
import itertools def compute_permutations(string): # Generate all permutations of the string permutations = itertools.permutations(string) # Convert each permutation tuple to a string permutations = [''.join(permutation) for permutation in permutations] return permutations # Prompt the user for a string string = input("Enter a string: ") # Compute permutations permutations = compute_permutations(string) # Display the permutations print("Permutations:") for permutation in permutations: print(permutation)