CodeGroundAI

import random def calcul_pourboire(): montant = float(input("Entrez le montant de la facture : ")) print("Choisissez un pourcentage de pourboire :") print("1. 15%\n2. 18%\n3. 20%\n4. Personnalisé") choix = input("Votre choix : ") if choix == '1': pourboire = montant * 0.15 elif choix == '2': pourboire = montant * 0.18 elif choix == '3': pourboire = montant * 0.20 elif choix == '4': pourcentage = float(input("Entrez le pourcentage de pourboire : ")) / 100 pourboire = montant * pourcentage else: print("Choix invalide.") return total = montant + pourboire print("Pourboire :", round(pourboire, 2), ", Total :", round(total, 2)) def conversion_unites(): print("1. Kilomètres ↔ Miles\n2. Celsius ↔ Fahrenheit\n3. Livres ↔ Kilogrammes\n4. Mètres ↔ Pieds\n5. Litres ↔ Gallons") choix = input("Votre choix : ") valeur = float(input("Entrez la valeur : ")) if choix == '1': print(valeur, "km =", valeur * 0.621371, "miles") elif choix == '2': print(valeur, "C =", valeur * 9 / 5 + 32, "F") elif choix == '3': print(valeur, "lbs =", valeur * 0.453592, "kg") elif choix == '4': print(valeur, "m =", valeur * 3.28084, "pieds") elif choix == '5': print(valeur, "L =", valeur * 0.264172, "gallons") else: print("Choix invalide.") def calcul_mathematique(): num1 = float(input("Entrez le premier nombre : ")) operateur = input("Choisissez une opération (+, -, *, /, sqrt) : ") if operateur == 'sqrt': print("La racine carrée de", num1, "est", num1 ** 0.5) else: num2 = float(input("Entrez le deuxième nombre : ")) if operateur == '+': print(num1 + num2) elif operateur == '-': print(num1 - num2) elif operateur == '*': print(num1 * num2) elif operateur == '/': print(num1 / num2) else: print("Opération invalide.") def conversion_monnaie(): taux = { "USD": 0.74, "EUR": 0.68, "GBP": 0.58, "JPY": 81.45, "MXN": 13.57, "CAD": 1.00 } montant = float(input("Entrez le montant en CAD : ")) devise = input("Convertir en (USD, EUR, GBP, JPY, MXN, CAD) : ").upper() if devise in taux: print(montant, "CAD =", montant * taux[devise], devise) else: print("Devise non prise en charge.") def generateur_nombre(): min_val = int(input("Entrez la valeur minimale : ")) max_val = int(input("Entrez la valeur maximale : ")) print("Nombre aléatoire :", random.randint(min_val, max_val)) def menu(): while True: print("\nBienvenue dans la Super Calculatrice Scientifique!") print("Que souhaitez-vous faire?") print("1. Calculer un pourboire") print("2. Convertir des unités") print("3. Effectuer un calcul mathématique") print("4. Convertir des devises") print("5. Générer un nombre aléatoire") print("6. Quitter") choix = input("Choisissez un nombre entre (1-6) : ") if choix == '1': calcul_pourboire() elif choix == '2': conversion_unites() elif choix == '3': calcul_mathematique() elif choix == '4': conversion_monnaie() elif choix == '5': generateur_nombre() elif choix == '6': print("Au revoir!") break else: print("Choix invalide. Veuillez choisir un numéro de (1 à 6).") menu()
Hint: Remember to include output statements in your code, such as print, console.log, printf, fmt.Println() or System.out.println.

Benefits of CodeGroundAI Online IDE

Multi-Language Support

CodeGroundAI Online IDE supports C++, Java, Node.js, Python, and more, making it an incredibly versatile tool for diverse coding needs. This extensive language support allows developers to work on different projects within a single platform.

Real-Time Collaboration

Our real-time collaboration feature enables multiple developers to work on the same project simultaneously, enhancing teamwork and productivity. This feature is particularly beneficial for remote teams and pair programming sessions.

User-Friendly Interface

Designed with a clean and intuitive interface, CodeGroundAI Online IDE simplifies coding and debugging processes, making it accessible for users of all skill levels. The ease of use and clear navigation ensure a smooth coding experience.

Instant Code Execution

Experience fast and efficient code execution with immediate feedback in the integrated terminal. This feature helps streamline the development process, allowing developers to quickly test and debug their code.

Free to Use

Enjoy the full range of features at no cost. CodeGroundAI Online IDE is completely free, providing a valuable resource for developers without any subscription fees. This makes it an ideal choice for students, hobbyists, and professionals alike.

Cloud-Based Platform

As a cloud-based IDE, CodeGroundAI allows you to access your projects from anywhere, at any time. This flexibility ensures that you can continue coding without being tied to a specific device or location.

Customizable Environment

Tailor the IDE to your preferences with customizable themes, layouts, and extensions. This personalization ensures a comfortable and productive coding environment.

Why Choose CodeGroundAI Over Other Online IDEs?

CodeGroundAI Online IDE stands out from the competition with its comprehensive feature set, ease of use, and cost-effectiveness. Unlike many other online IDEs that require subscriptions or offer limited free plans, CodeGroundAI provides all its features for free. Our multi-language support, real-time collaboration, and advanced debugging tools ensure that you have everything you need for effective development. Additionally, our user-friendly interface and customizable environment make coding a pleasant experience, regardless of your expertise level. Choose CodeGroundAI Online IDE for a seamless, efficient, and enjoyable coding experience.

×
Ground visible to everyone?
No
Yes
Ground editable by everyone?
No
Yes
Get a new ground?