myCompiler
English
Deutsch
English
Español
Français
Italiano
日本語
한국어
Nederlands
Polski
Português
Recent
Login
Sign up
Deutsch
English
Español
Français
Italiano
日本語
한국어
Nederlands
Polski
Português
Recent
Login
Sign up
C
@cheeseofthecheeses
math
Python
2 weeks ago
import math def calculate_trig_values(angle_degrees): """ Calculate sin, cos, and tan values for a given angle """ angle_radians = math.radians(angle_degrees) sin_value = math.sin(angle_radians) cos_value = math.cos(angle_rad
test
Python
3 weeks ago
def add(a,b): return a + b def subtract(a,b): return a - b def multipluy(a,b): return a * b def divide(a,b):
exeception
Python
3 weeks ago
def check_age(): while True: try: age = input("Enter your age: ").strip() if not age: raise ValueError("Age cannot be empty!") if not age.isdigit(): raise ValueError("
random math module
Python
4 weeks ago
import random playing = True numbergenerated = str(random.randint(0,9)) print("I will generate a number from 0 to 9, and you have to guess the number one digit at a time.") while playing: guess = input("give me your best guess!/n") if numbe
due amount
Python
4 weeks ago
# bill_calculator.py def calculate_due(): bill = float(input("Enter bill amount: $")) paid = float(input("Enter paid amount: $")) due = bill - paid print(f"\nBill: ${bill:.2f}") print(f"Paid: ${paid:.2f}") print("-" * 2
valueerror.py
Python
1 month ago
try: num1, num2 = eval(input("Enter two numbers")) result = num1 / num2 print("result is",result) except ZeroDivisionError: print("Division by zero is error !!") except SyntaxError: print("Comma is missing.Enter numbers seperat
Previous
Next page