print("Hello World!")
print(2 + 3*5)
import math print(math.factorial(100))
import math def square(x): return x**2 def cube(x): return x**3 def main(): print("Square of 15 is:", square(15)) print("Cube of 15 is:", cube(15)) if __name__ == "__main__": main()
import math # Compute square root of ten. root = math.sqrt(10) # Display the result. print(root)
a = float(input("Enter first number: ")) b = float(input("Enter second number: ")) print("Addition: ", a + b) print("Subtraction: ", a - b) print("Multiplication: ", a * b) print("Division: ", a / b)
import random def main(): num1 = random.randint(1, 100) num2 = random.randint(1, 100) print("The first number is:", num1) print("The second number is:", num2) print("The sum of the two numbers is:", num1 + num2) print("The difference of the two numbers is:", num1 - num2) print("The product of the two numbers is:", num1 * num2) print("The quotient of the two numbers is:", num1 / num2) main()
Disclaimer:
Patodia Infotech Private Limited (fastdevai.com) has no responsibility for any text or code generated or for any action taken by you based on the contents provided by this web site. The use of this web site is solely at the user's risk. All the services are provided with the understanding that Patodia Infotech Private Limited or any other person or company associated with this company or website are not responsible for any loss or damage occurring to anybody from any code or contents generated by this website. Please note that text, codes and contents are generated by AI. These are state-of-the-art AI solutions. However, these are AI tools so there is no guarantee of accuracy of any code or contents generated.