اذهب إلى المحتوى

Mohamed Farahat

الأعضاء
  • المساهمات

    86
  • تاريخ الانضمام

  • تاريخ آخر زيارة

المعلومات الشخصية

  • النبذة الشخصية
    I am an aspiring Python developer with a growing interest in software development. My journey into the world of programming began with a curiosity for problem-solving
  • الموقع

آخر الزوار

1101 زيارة للملف الشخصي

إنجازات Mohamed Farahat

عضو نشيط

عضو نشيط (3/3)

80

السمعة بالموقع

  1. def main(): input_string = 'aLongAndComplexString' print(input_string) Sorry, your code does not pass. Keep trying. You should call convert_to_snake_case() inside the main() function and pass 'aLongAndComplexString' as input to the function. Just got it thank you for your help def main(): convert_to_snake_case() my_function("Input String") print(convert_to_snake_case('aLongAndComplexString'))
  2. مرحبا, I've been stuck on this problem for a while. Could someone help me, please? Thank you in advance def convert_to_snake_case(pascal_or_camel_cased_string): snake_cased_char_list = [] for char in pascal_or_camel_cased_string: if char.isupper(): converted_character = '_' + char.lower() snake_cased_char_list.append(converted_character) else: snake_cased_char_list.append(char) snake_cased_string = ''.join(snake_cased_char_list) clean_snake_cased_string = snake_cased_string.strip('_') return clean_snake_cased_string def main(): pass Inside the main() function, replace pass with a convert_to_snake_case() call. Pass the string 'aLongAndComplexString' as input to the function and print out the output using the print() function.
  3. مرحبا I am so curios to solve this problem, you can achieve this task using the OpenCV library in Python import cv2 def add_images(image1_path, image2_path): # Read the images image1 = cv2.imread(image1_path) image2 = cv2.imread(image2_path) # Ensure both images have the same dimensions image2 = cv2.resize(image2, (image1.shape[1], image1.shape[0])) # Add the images result = cv2.addWeighted(image1, 0.5, image2, 0.5, 0) return result def main(): # Paths to the input images image1_path = "image1.jpg" image2_path = "image2.jpg" # Add the images result_image = add_images(image1_path, image2_path) # Display the resulting image cv2.imshow("Result", result_image) cv2.waitKey(0) cv2.destroyAllWindows() if __name__ == "__main__": main() replace "image1.jpg" and "image2.jpg" with the paths to your actual images This program reads two images, resizes the second image to match the dimensions of the first one, adds them together using cv2.addWeighted()
  4. I have a new game I just finished rock paper scissors but with a different touch please,tell me you opinion, thank you rockPaperScissors.py
  5. I also have a small project that I wrote a while ago for a petrol station cashier, thank you app_print.py I also have one for a parking system made for an actual parking in Barcelona
  6. السلام عليكم Why is it that the python course does not have a part for Python GUI, I think tKinter is a very important tool for developers and end users as it is very user friendly, thank you
  7. I had this idea what do you think. thank you sleepv4.py sorry my keyboard in europe does not write arabic but I have five sleepversions but I thought that the 4th was the best one, thank you
  8. File "C:\Users\mohbc\Taskaty\taskaty\app.py", line 37, in <module> main() File "C:\Users\mohbc\Taskaty\taskaty\app.py", line 34, in main args.func(args) File "C:\Users\mohbc\Taskaty\taskaty\taskController.py", line 64, in display all_tasks = self.list_all_tasks() ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\mohbc\Taskaty\taskaty\taskController.py", line 39, in list_all_tasks title, description, start_date, end_date, done = line.split(', ') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: not enough values to unpack (expected 5, got 4)
×
×
  • أضف...