i have a python code you just have to convert it into html,css,java script files code…
- User
i have a python code you just have to convert it into html,css,java script files code seprately, : # Abjad calculator with letter counting
Abjad values and categories
abjad_values = { 'ا': 1, 'أ': 1, 'إ': 1, 'آ': 1, 'ٱ': 1, 'ء': 1, 'ئ': 1, 'ب': 2, 'پ': 2, 'ج': 3, 'چ': 3, 'د': 4, 'ڈ': 4, 'ه': 5, 'ہ': 5, 'ه': 5, 'ھ': 5, 'ة': 5, 'و': 6, 'ؤ': 6, 'ز': 7, 'ژ': 7, 'ح': 8, 'ط': 9, 'ى': 10, 'ي': 10, 'ی': 10, 'ے': 10, 'ک': 20, 'ك': 20, 'گ': 20, 'ل': 30, 'م': 40, 'ن': 50, 'ں': 50, 'س': 60, 'ع': 70, 'ف': 80, 'ص': 90, 'ق': 100, 'ر': 200, 'ڑ': 200, 'ش': 300, 'ت': 400, 'ٹ': 400, 'ث': 500, 'خ': 600, 'ذ': 700, 'ض': 800, 'ظ': 900, 'غ': 1000, }
def calculate_abjad(input_string): total_value = 0 letter_total = 0 # Total letter count excluding spaces
code# Normalize input string to handle only valid Arabic letters from our chart for char in input_string: if char in abjad_values: total_value += abjad_values[char] letter_total += 1 # Count each letter return total_value, letter_totaldef main(): print("Welcome to the Abjad Calculator!") user_input = input("Please enter a string of letters (Arabic): ")
codetotal_value, letter_total = calculate_abjad(user_input) print(f"\nTotal numeric value: {total_value}") print(f"Total letter count: {letter_total}")if name == "main": main()
- Assistant
- User
its not owkring
- Assistant
- User
welldone
- Assistant
Thank you! I'm glad to hear that it's working well for you! If you have any more questions or need further assistance with the Abjad calculator or anything else, feel free to ask. Happy coding!
- User
just need to add this chart table for the new calculations in existing script and tell me how can i combine two scripts : ا 1 Fire أ 1 Fire إ 1 Fire آ 1 Fire ٱ 1 Fire ء 1 Fire ئ 1 Fire ئ 1 Fire ب 2 Earth پ 2 Earth ج 3 Air چ 3 Air د 4 Water ڈ 4 Water ه 5 Fire ہ 5 Fire ه 5 Fire ھ 5 Fire ة 5 Fire و 6 Earth ؤ 6 Earth ز 7 Air ژ 7 Air ح 8 Water ط 9 Fire ى 10 Earth ي 10 Earth ی 10 Earth ے 10 Earth ک 11 Air ك 11 Air گ 11 Air ل 12 Water م 13 Fire ں 14 Earth ن 14 Earth س 15 Air ع 16 Water ف 17 Fire ص 18 Earth ق 19 Air ر 20 Water ڑ 20 Water ش 21 Fire ت 22 Earth ٹ 22 Earth ث 23 Air خ 24 Water ذ 25 Fire ض 26 Earth ظ 27 Air غ 28 Water
- Assistant