├── December-01 ├── C++_koushika.CPP ├── C_1 AJShalini21.cpp ├── c_Nilesh2000.c ├── c_RohitMidha23.c ├── c_Sushmakarunakaran.c ├── c_crytotech.c ├── c_imhphari.c ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_binary.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_binarysearch.py.py ├── python_Raahul46_Binary_search.py ├── python_aashish2000.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_binarysearch.py ├── python_kumaran_binary.py ├── python_nivethitharajendran_1Binarysearch.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-02 ├── C++_koushika.CPP ├── C_2 AJShalini21.cpp ├── c++_Nilesh2000.cpp ├── c++_kumaran_triangle.cpp ├── c_RohitMidha23.c ├── c_Sushmakarunakaran.c ├── c_crytotech.c ├── cpp_imhphari.cpp ├── csharp_arjunAravind.cs ├── py_ajaykrishnan23.py ├── py_anuppriya_triangles.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_similarTriangles.py.py ├── python_Raahul46_Similar_triangles.py ├── python_aashish2000_similarTriangles.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_similartriangles.py ├── python_nivethitharajendran_2similartriangles.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-03 ├── C++_koushika.CPP ├── C_3 AJShalini21.cpp ├── c++_kumaran_luckyno.cpp ├── c_Nilesh2000.c ├── c_RohitMidha23.c ├── c_Sushmakarunakaran.c ├── cpp_crytotech.cpp ├── cpp_imhphari.cpp ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_luckyno.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_luckynumber.py.py ├── python_Raahul46_Lucky_numbers.py ├── python_aashish2000_isLucky.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_LuckyNumber.py ├── python_nivethitharajendran_3luckynumber.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-04 ├── C++_koushika.cpp ├── C_4 AJShalini21.cpp ├── c++_kumaran_fibonacci.cpp ├── c_Nilesh2000.c ├── c_RohitMidha23.c ├── c_Sushmakarunakaran ├── cpp_crytotech.cpp ├── cpp_imhphari.cpp ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_fibonacci.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_fibonacciseries.py ├── python_Raahul46_fibnacci.py ├── python_aashish2000_fibonacci.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_FibonacciSeries.py ├── python_nivethitharajendran_4fibanocci.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-05 ├── C++_koushika.CPP ├── C_5 AJShalini21.cpp ├── c_Nilesh2000.c ├── c_RohitMidha23.c ├── c_Sushmakarunakaran.c ├── c_crytotech.c ├── c_kumaran_hanoi.c ├── cpp_imhphari.cpp ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_towershanoi.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_towerofhanoi.py ├── python_Raahul46_Tower_of_hanoi.py ├── python_aashish2000_hanoi.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_TowerofHanoi.py ├── python_nivethitharajendran_5towerofhanoi.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-06 ├── C++_koushika.CPP ├── C_6 AJShalini21.cpp ├── c++_kumaran_lcm.cpp ├── c_Nilesh2000.c ├── c_RohitMidha23.c ├── c_Sushmakarunakaran.c ├── cp_crytotech.cpp ├── cpp_imhphari.cpp ├── go_ArjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_lcm.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_lcm.py ├── python_Raahul46_LCM.py ├── python_aashish2000_lcm.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_LCM.py ├── python_nivethitharajendran_6lcm.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-07 ├── C++_koushika.CPP ├── C_7 AJShalini21.cpp ├── c_Nilesh2000.c ├── c_Sushmakarunakaran.c ├── cpp_imhphari.cpp ├── csharp_arjunAravind.cs ├── java_crytotech.java ├── py_ajaykrishnan23.py ├── py_anuppriya_approxeq.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_approximateequal.py ├── python_Raahul46_Approx_equal.py ├── python_RohitMidha23.py ├── python_aashish2000_round.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_Approximation.py ├── python_kumaran_equal.py ├── python_nivethitharajendran_7approximatelyequal.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-08 ├── cpp_crytotech.cpp ├── go_arjunAravind.go ├── py_8 AJShalini21.py ├── py_ajaykrishnan23.py ├── py_anuppriya_singularplural.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_singularplural.py ├── python_Nilesh2000.py ├── python_Raahul46_Singular_to_plural.py ├── python_RohitMidha23.py ├── python_Sushmakarunakaran.py ├── python_aashish2000_SingPlu.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_SINGULAR PLURAL.py ├── python_koushika.py ├── python_kumaran_singplural.py ├── python_nivethitharajendran_8plural.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-09 ├── C++_koushika.cpp ├── Python_Nilesh2000.py ├── go_arjunAravind.go ├── java_crytotech.java ├── py_9 AJShalini21.py ├── py_ajaykrishnan23.py ├── py_anuppriya_url.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_isthisanurl.py ├── python_Raahul46_IS_THIS_URL.py ├── python_RohitMidha23.py ├── python_Sushmakarunakaran.py ├── python_aashish2000_IsURL.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_URL_VALIDATION.py ├── python_kumaran_url.py ├── python_nivethitharajendran_9url.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-10 ├── C++_koushika.cpp ├── c++_kumaran_determinant.cpp ├── c_Nilesh2000.c ├── c_RohitMidha23.c ├── cpp_crytotech.cpp ├── go_arjunAravind.go ├── py_10 AJShalini21.py ├── py_ajaykrishnan23.py ├── py_anuppriya_determinant.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_determinant.py ├── python_Raahul46_determinant.py ├── python_aashish2000_Determinant.py ├── python_dec10_Sushmakarunakaran.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_FIND_THE_DETERMINANT.py ├── python_nivethitharajendran_10determinant.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-11 ├── C++_koushika.cpp ├── C_11 AJShalini21.cpp ├── c_AkshayaRC.c ├── c_Nilesh2000.c ├── c_RohitMidha23.c ├── c_Sushmakarunakaran.c ├── c_crytotech.c ├── c_kumaran_spiralmat.c ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_spiralmat.py ├── py_imhphari.py ├── python_MaddyDinesh_printingmatrixinaspiralform.py ├── python_Raahul46_Spiral.py ├── python_aashish2000_Spiral.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_SPIRAL.py ├── python_nivethitharajendran_11spiral.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-12 ├── C++_koushika.cpp ├── C_12 AJShalini21.cpp ├── c++_kumaran_reversesingly.cpp ├── c_MaddyDinesh_reversinglinkedlist.c ├── c_Nilesh2000.c ├── c_RohitMidha23.c ├── c_Sushmakarunakaran.c ├── c_nivethitharajendran_12.reversinglinkedlist.c.c ├── cpp_crytotech.cpp ├── cpp_sartsha.cpp ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_revsinglylinkedlist.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_Raahul46_reverse_link_list.py ├── python_aashish2000_revLinkList.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_reverse.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_shrufire.py └── python_surudhi.py ├── December-13 ├── C++_koushika.cpp ├── C_13 AJShalini21.cpp ├── c_Nilesh2000.c ├── c_RohitMidha23.c ├── c_Sushmakarunakaran.c ├── csharp_arjunAravind.cs ├── py_ajaykrishnan23.py ├── py_anuppriya_lexicography.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_lexicographicalarrangement.py ├── python_Raahul46_Lexicographical_Arrangement.py ├── python_aashish2000_lexArr.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_Lexicographical Arrangement.py ├── python_kumaran_lexicographical.py ├── python_nivethitharajendran_13lexicographical.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-14 ├── C++_koushika.cpp ├── C_14 AJShalini21.cpp ├── c++_MaddyDinesh_caesar cipher.cpp ├── c++_nivethitharajendran_14caesar cipher.cpp.cpp ├── c_Nilesh2000.c ├── c_Sushmakarunakaran.c ├── csharp_arjunAravind.cs ├── py_ajaykrishnan23.py ├── py_anuppriya_caesarcipher.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_Raahul46_caesar_cipher.py ├── python_RohitMidha23.py ├── python_aashish2000_caeCipher.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_Caesar_Cipher.py ├── python_kumaran_caesar.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-15 ├── C++_Nilesh2000.cpp ├── C++_koushika.cpp ├── C_15 AJShalini21.cpp ├── c++_MaddyDinesh_pascalstriangle.cpp ├── c++_nivethitharajendran_15pascalstriangle.cpp.cpp ├── c_Sushmakarunakaran.c ├── c_kumaran_pascal.c ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_pascaltriangle.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_Raahul46_pascal_triangle.py ├── python_RohitMidha23.py ├── python_aashish2000_pasTri.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_Pascal's_Triangle.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-16 ├── py_16 AJShalini21.py ├── py_ajaykrishnan23.py ├── py_anuppriya_tempdifference.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_findtemperaturdifferencebetwwentwocities.py ├── python_Nilesh2000.py ├── python_Raahul46_temperature_differnce.py ├── python_RohitMidha23.py ├── python_Sushmakarunakaran.py ├── python_aashish2000_TempDiff.py ├── python_arjunAravind.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_temperature_difference.py ├── python_koushika.py ├── python_kumaran_temperature.py ├── python_nivethitharajendran_16tempdifference.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-17 ├── C++_koushika.cpp ├── C_17 AJShalini21.cpp ├── Python_raahul46.py ├── c_MaddyDinesh_magicsquare.c ├── c_Sushmakarunakaran.c ├── c_kumaran_magic.c ├── c_nivethitharajendran_17magicsquare.c.c ├── c_prasanna77cr7.c ├── go_arjunAravind.go ├── harshith_magicsquares_python.py ├── py_ajaykrishnan23.py ├── py_anuppriya_magicsquare.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_Nilesh2000.py ├── python_RohitMidha23.py ├── python_aashish2000_MagicSquare.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-18 ├── C++_Nilesh2000.cpp ├── C++_koushika.cpp ├── csharp_arjunAravind.cs ├── py_18 AJShalini21.py ├── py_ajaykrishnan23.py ├── py_anuppriya_pwsecured.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_howsecureisyourpassword.py ├── python_Raahul46_Brute_force.py ├── python_RohitMidha23.py ├── python_Sushmakarunakran.py ├── python_aashish2000_PassHack.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_bruteforce.py ├── python_kumaran_secure.py ├── python_nivethitharajendran_18password.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-19 ├── C++_koushika.cpp ├── c_RohitMidha23 │ ├── Hashing.c │ ├── LinearProbing.h │ └── SeparateChain.h ├── csharp_arjunAravind.cs ├── py_19 AJShalini21.py ├── py_ajaykrishnan23.py ├── py_anuppriya_hashing.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_hashing.py ├── python_Nilesh2000.py ├── python_Raahul46_hashing.py ├── python_Sushmakarunakaran_hashing.py ├── python_aashish2000_Hash.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_hashing.py ├── python_kumaran_hashing.py ├── python_nivethitharajendran_19hashing.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-20 ├── C++_Nilesh2000.cpp ├── C++_Raahul46_Dijkstras_Shortest_Reach.cpp ├── C++_koushika.cpp ├── C_20 AJShalini21.cpp ├── c++_MaddyDinesh_djikstra.cpp ├── c++_harshith_dijkstra's.cpp ├── c++_nivethitharajendran_20djikstra.cpp.cpp ├── c++_prasanna77cr7.cpp ├── c_RohitMidha23.c ├── c_Sushmakarunakaran.c ├── c_kumaran_dijistra.c ├── cpp_ajaykrishnan23.cpp ├── cpp_crytotech.cpp ├── go1_arjunAravind.go ├── py_anuppriya_dijikstras.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_aashish2000_Dijkstra.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-21 ├── C++_Nilesh2000.cpp ├── C++_koushika.cpp ├── Dec21-Exchange_Rates.csv ├── c++_MaddyDinesh_currencyconvertor.cpp ├── c++_kumaran_currency.cpp ├── c++_nivethitharajendran_21currencyconvertor.cpp.cpp ├── csharp_arjunAravind.cs ├── py_21 AJShalini21.py ├── py_ajaykrishnan23.py ├── py_anuppriya_currencyconv.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_Raahul46_currency_conv.py ├── python_RohitMidha23.py ├── python_Sushmakarunakaran.py ├── python_aashish2000_currCon.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_currency_convertor.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-22 ├── C++_koushika.cpp ├── C_22 AJShalini21.cpp ├── c_Nilesh2000.c ├── c_Sushmakarunakaran.c ├── csharp_arjunAravind.cs ├── harshith_python_wordcount.py ├── py_ajaykrishnan23.py ├── py_anuppriya_wordcount.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_wordcount.py.py ├── python_Raahul46_word_count.py ├── python_RohitMidha22.py ├── python_aashish2000_wordcount.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_kumaran_wordcount.py ├── python_nivethitharajendran_22wordcount.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py ├── python_surudhi.py └── text.txt ├── December-23 ├── C++_koushika.cpp ├── C_23 AJShalini21.cpp ├── c_Sushmakarunakaran.c ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_seatingarrangement.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_seatingarrangement.py.py ├── python_Nilesh2000.py ├── python_Raahul46_Exam_Seating_Arrangement.py ├── python_RohitMidha23.py ├── python_aashish2000_ArrangeSeat.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_seatingarrangement.py ├── python_kumaran_examseat.py ├── python_nivethitharajendran_23examseating.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-24 ├── C++_koushika.cpp ├── C_24 AJShalini21.cpp ├── c_Nilesh2000.c ├── c_Sushmakarunakaran.c ├── csharp_arjunAravind.cs ├── harshith_python_reverse a string.py ├── py_ajaykrishnan23.py ├── py_anuppriya_stringrecurrsion.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_stringreverse.py ├── python_Raahul46_reverse_string.py ├── python_RohitMidha24.py ├── python_aashish2000_recRevStr.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_kumaran_reversestring.py ├── python_nivethitharajendran_24stringreverse.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-25 ├── C++_koushika.cpp ├── C_25 AJShalini21.cpp ├── c_MaddyDinesh_santassselfdrivingsleigh.c.txt ├── c_Nilesh2000.c ├── c_Sushmakarunakaran.c ├── c_harshith_santa.c ├── c_kumaran_santa.c ├── c_nivethitharajendran_25santa.c.c ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_santa.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_Raahul46_Santa_s_Self_Driving_Sleigh.py ├── python_RohitMidha23.py ├── python_aashish2000_santaSleigh.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_prasanna77cr7.c ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-26 ├── C++_koushika.cpp ├── C_26 AJShalini21.cpp ├── c++_Nilesh2000.cpp ├── c++_nivethitharajendran_26commonprefix.py.cpp ├── c_MaddyDinesh_commonprefix.c ├── c_Sushmakarunakaran.c ├── common_prefix_harshith_python.py ├── csharp_arjunAravind.cs ├── py_ajaykrishnan23.py ├── py_anuppriya_commonprefix.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_Raahul46_Common_Prefix.py ├── python_RohitMidha23.py ├── python_aashish2000_commonPrefix.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_kumaran_prefix.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-27 ├── C++_koushika.cpp ├── C_27 AJShalini21.cpp ├── c++_Nilesh2000.cpp ├── c++_nivethitharajendran_27vowelsquare.cpp.cpp ├── c_MaddyDinesh_vowelsquare.c.txt ├── c_Sushmakarunakaran.c ├── c_kumaran_vowel.c ├── c_prasanna77cr7.py ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_vowelsquare.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_Raahul46_VowelSquare.py ├── python_RohitMidha23.py ├── python_aashish2000_VovelSquare.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_vowel_square.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-28 ├── C++_koushika.cpp ├── C_28 AJShalini21.cpp ├── c_MaddyDinesh_identicaldiagonals.c.txt ├── c_Nilesh2000.c ├── c_Sushmakarunakaran.c ├── c_harshith_identical_diagonals.c ├── c_kumaran_identicaldiag.c ├── c_nivethitharajendran_28identicaldiag.py.c ├── c_prasanna77cr7.c ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_identicaldiag.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_Raahul46_identical_diagonals.py ├── python_RohitMidha28.py ├── python_aashish2000_diagequal.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-29 ├── C++_koushika.cpp ├── C_29 AJShalini21.cpp ├── c++_kumaran_cupstring.cpp ├── c_Nilesh2000.c ├── c_Sushmakarunakaran.c ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_cupstring.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_cupandstringphone.py.py ├── python_Raahul46_cup_and_string.py ├── python_RohitMidha23.py ├── python_aashish2000_cupString.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_cup&string.py ├── python_nivethitharajendran_29cupandstring.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-30 ├── C++_koushika.cpp ├── C_30 AJShalini21.cpp ├── c++_kumaran_noofdiag.cpp ├── c_Nilesh2000.c ├── c_Sushmakarunakaran.c ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_noofdiagnols.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_numberofdiagonals.py.py ├── python_Raahul46_no_of_diagonals.py ├── python_RohitMidha23.py ├── python_aashish2000_diag.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_harshith_diagonals.py ├── python_nivethitharajendran_30diagonals.py.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── December-31 ├── C++_koushika.cpp ├── C_31 AJShalini21.cpp ├── c_Nilesh2000.c ├── c_Sushmakarunakaran.c ├── closest_cell_harshith_python.py ├── go_arjunAravind.go ├── py_ajaykrishnan23.py ├── py_anuppriya_closestcell.py ├── py_imhphari.py ├── python_AkshayaRC.py ├── python_MaddyDinesh_closestcell.py ├── python_Raahul46_closest_cell.py ├── python_RohitMidha23.py ├── python_aashish2000_ClosestCell.py ├── python_crytotech.py ├── python_drstrange11.py ├── python_exampleUser.py ├── python_kumaran_closest.py ├── python_nivethitharajendran_31closestcell.py ├── python_prasanna77cr7.py ├── python_raf1800.py ├── python_sartsha.py ├── python_shrufire.py └── python_surudhi.py ├── README.md └── src ├── .gitkeep ├── assets └── Header.png └── docs ├── Dec17-Example.png ├── Dec18-1000_most_common_passwords.txt ├── Dec20-Example.jpg ├── Dec21-Exchange_Rates.csv ├── Dec25-Example.png ├── Dec30-ExampleImg.jpg ├── dec29-mesh.jpg └── dec29-string-phone.jpg /December-01/C_1 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int n=100,key,guess,low=0,mid,high; 5 | printf("Say my choosen number is\t"); 6 | scanf("%d",&key); 7 | high=n; 8 | while(low<=high) 9 | { 10 | printf("\nGuess\t"); 11 | scanf("%d",&guess); 12 | mid=(low+high)/2; 13 | if(key==guess) 14 | { 15 | printf("half of %d to %d -> spot on",low,high); 16 | break; 17 | } 18 | else if(key>guess) 19 | printf("half of %d to %d -> you are too low",low,high); 20 | else 21 | printf("half of %d to %d -> you are too high",low,high); 22 | if(key>mid) 23 | low=mid; 24 | else 25 | high=mid; 26 | } 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /December-01/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | def binary_search( x, start, end): 4 | 5 | mid = int((start + end)/2) 6 | if(x>mid): 7 | print('Higher') 8 | binary_search(x,mid+1,end) 9 | elif (x",end=" ") 15 | if(l[mid]==n): 16 | print("spot on!") 17 | break 18 | else: 19 | if(l[mid]>n): 20 | print("you're too high") 21 | high=mid-1 22 | if(l[mid]high: 26 | print("not found!") 27 | 28 | -------------------------------------------------------------------------------- /December-01/python_MaddyDinesh_binarysearch.py.py: -------------------------------------------------------------------------------- 1 | def binary_search(arr,l,r,ele): 2 | while l<=r: 3 | mid=l+(r-1)//2 4 | if arr[mid]==ele: 5 | print("Guess",mid,"(half of",l,"to",r,")->you found") 6 | return mid 7 | elif arr[mid]you'r to high") 9 | l=mid+1 10 | else: 11 | print("Guess",mid,"(half of",l,"to",r,")->you'r to low") 12 | 13 | r=mid-1 14 | return -1 15 | arr=[10,20,30,40,50] 16 | ele=30 17 | pos=binary_search(arr,0,len(arr)-1,ele) 18 | 19 | if pos!=-1: 20 | print("\nElement present in",pos,"position") 21 | else: 22 | print("Element not found") 23 | -------------------------------------------------------------------------------- /December-01/python_aashish2000.py: -------------------------------------------------------------------------------- 1 | def binarySearch(l,r,x): 2 | mid=l+(r-l)//2 3 | print("Guess",mid,"(half of",l,"and",r,")",end=" ") 4 | if(mid>x): 5 | print("->you're too high") 6 | binarySearch(l,mid-1,x) 7 | 8 | if(midyou're too low") 10 | binarySearch(mid+1,r,x) 11 | if(mid==x): 12 | print("->spot on!") 13 | 14 | no=int(input("Enter Secret Number:")) 15 | l=0 16 | r=100 17 | while True: 18 | if(r arr[mid]): 5 | start_index = mid + 1 6 | elif (element < arr[mid]): 7 | last_index = mid - 1 8 | elif (element == arr[mid]): 9 | return mid 10 | return -1 11 | 12 | 13 | arr = [10,20,30,40,50,60] 14 | element = int(input("Enter a number")) 15 | start_index = 0 16 | last_index = len(arr) - 1 17 | found = Binary_search(arr, start_index, last_index, element) 18 | if (found == -1): 19 | print("element not present in array") 20 | else: 21 | print("element is present at index " + str(found)) 22 | -------------------------------------------------------------------------------- /December-01/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | def binarySearch(alist, item): 2 | first = 0 3 | last = len(alist)-1 4 | found = False 5 | 6 | while first<=last and not found: 7 | midpoint = int((first + last)//2) 8 | if alist[midpoint] == item: 9 | found = True 10 | else: 11 | if item < alist[midpoint]: 12 | last = midpoint-1 13 | else: 14 | first = midpoint+1 15 | 16 | return found 17 | a=[] 18 | n=int(input("enter the no of elements")) 19 | for i in range (0,n): 20 | a.append(int(input())) 21 | a.sort() 22 | m=int(input("enter the element to search")) 23 | print(binarySearch(a,m)) 24 | -------------------------------------------------------------------------------- /December-01/python_shrufire.py: -------------------------------------------------------------------------------- 1 | import random 2 | x=random.randint(1,100) 3 | flag=1 4 | u=1 5 | l=100 6 | while flag: 7 | g=int(input('Enter your guess: ')) 8 | if x==g: 9 | flag=0 10 | print('Your guess is right,',x) 11 | else: 12 | if x>g: 13 | print('Your guess is lesser') 14 | u=g 15 | print('Guess a number between',u,' and ',l) 16 | else: 17 | print('Your guess is more') 18 | l=g 19 | print('Guess a number between',u,' and ',l) 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /December-01/python_surudhi.py: -------------------------------------------------------------------------------- 1 | import random 2 | x=random.randint(1,100) 3 | flag=1 4 | u=1 5 | l=100 6 | while flag: 7 | g=int(input('Enter your guess: ')) 8 | if x==g: 9 | flag=0 10 | print('Your guess is right,',x) 11 | else: 12 | if x>g: 13 | print('Your guess is lesser') 14 | u=g 15 | print('Guess a number between',u,' and ',l) 16 | else: 17 | print('Your guess is more') 18 | l=g 19 | print('Guess a number between',u,' and ',l) 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /December-02/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-03/C_3 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int n,a[10],s1=0,s2=0,i,d,size; 5 | printf("Enter the number"); 6 | scanf("%d",&n); 7 | for(i=0;n>0;i++) 8 | { 9 | d=n%10; 10 | a[i]=d; 11 | n=n/10; 12 | } 13 | size=i; 14 | for(i=0;i 2 | 3 | int main() 4 | { 5 | int n; 6 | printf("Enter Ticket Number: "); 7 | scanf("%d",&n); 8 | int a[10]; 9 | int temp=n,len=0; 10 | int rem; 11 | while(temp>0) 12 | { 13 | a[len++] = temp%10; 14 | temp/=10; 15 | } 16 | int s1=0,s2=0; 17 | for(int i=0;i 2 | using namespace std; 3 | int main(){ 4 | int i,n,k,c,j=0,mid=0,l,sum1=0,sum2=0,count1=1; 5 | cout<<"Enter a number with even digits :"; 6 | cin>>n; 7 | k=n; 8 | l=n; 9 | //checking for length of the number 10 | while(l>1){ 11 | count1++; 12 | l=l/10; 13 | } 14 | mid=count1/2; 15 | i=1; 16 | // checking for lucky number 17 | while(n>=1){ 18 | c=n%10; 19 | if(i<=mid){ 20 | sum1=sum1+c; 21 | i++; 22 | } 23 | else{ 24 | sum2=sum2+c; 25 | } 26 | n=n/10; 27 | } 28 | if(sum1==sum2){ 29 | cout< 2 | using namespace std; 3 | 4 | int islucky(int nn){ 5 | int no[100],count=0,s=0,r=0,i; 6 | 7 | for(i=0;nn>0;i++){ 8 | no[i]=nn%10; 9 | 10 | nn=nn/10; 11 | count++; 12 | } 13 | 14 | 15 | for(i=0;i>n; 35 | 36 | int lucky=islucky(n); 37 | if(lucky==1) cout<<"Lucky"; 38 | else cout<<"unlucky"; 39 | } 40 | -------------------------------------------------------------------------------- /December-03/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | def islucky(n): 2 | count = 0 3 | t = n 4 | while(t>0): 5 | t = int(t/10) 6 | count = count+1 7 | t = 0 8 | l = 0 9 | r = 0 10 | while(t < count/2): 11 | rem = n%10 12 | r = r + rem 13 | t = t + 1 14 | n = int(n/10) 15 | while(t < count): 16 | rem = n%10 17 | l = l + rem 18 | t = t + 1 19 | n = int(n/10) 20 | if l==r: 21 | return True 22 | else: 23 | return False 24 | 25 | def main(): 26 | n = int(input('Enter a Ticket number')) 27 | k = islucky(n) 28 | print(k) 29 | 30 | main() -------------------------------------------------------------------------------- /December-03/py_anuppriya_luckyno.py: -------------------------------------------------------------------------------- 1 | num=int(input("Enter the Ticket Number: ")) 2 | a=list(str(num)) 3 | s1=0 4 | s2=0 5 | i=0; 6 | j=len(str(num))-1 7 | while(i0: 5 | n/=10 6 | i=1 7 | sum1=sum2=0 8 | j=i 9 | while j>i/2: 10 | sum1+=a%10 11 | a=a/10 12 | j=j-1 13 | while j>0: 14 | sum2+=a%10 15 | a=a/10 16 | j=j-1 17 | if sum1==sum2: 18 | return True 19 | else: 20 | return False 21 | 22 | n=int(input('Enter your ticket number: ')) 23 | print(isLucky(n)) 24 | 25 | -------------------------------------------------------------------------------- /December-03/python_surudhi.py: -------------------------------------------------------------------------------- 1 | def isLucky(n): 2 | a=n 3 | i=j=0 4 | while n>0: 5 | n/=10 6 | i=1 7 | sum1=sum2=0 8 | j=i 9 | while j>i/2: 10 | sum1+=a%10 11 | a=a/10 12 | j=j-1 13 | while j>0: 14 | sum2+=a%10 15 | a=a/10 16 | j=j-1 17 | if sum1==sum2: 18 | return True 19 | else: 20 | return False 21 | 22 | n=int(input('Enter your ticket number: ')) 23 | print(isLucky(n)) 24 | 25 | -------------------------------------------------------------------------------- /December-04/C++_koushika.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Author: Koushika Kesavan 3 | Date of Creation: 26 December 2018, Tuesday 4 | Title: Fibonacci series 5 | All rights reserved 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | void main() 13 | { 14 | int i=0,n,first=-1,second=1,third; 15 | cout<<"\nEnter the value of n:"; 16 | cin>>n; 17 | while(i 2 | int main() 3 | { 4 | int pv=0,cv=1,nv=0,n,i; 5 | printf("Enter the value of n "); 6 | scanf("%d",&n); 7 | for(i=3;i<=n;i++) 8 | { 9 | nv=cv+pv; 10 | pv=cv; 11 | cv=nv; 12 | } 13 | if(n==1||n==2) 14 | printf("The %dth fibonacci no. is %d",n,n-1); 15 | else 16 | printf("The %dth fibonacci no. is %d",n,nv); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /December-04/c++_kumaran_fibonacci.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | using namespace std; 5 | 6 | int main() 7 | 8 | { 9 | 10 | int a=-1,b=1,c=0,n,i; 11 | cout<<"Enter n series"; 12 | cin>>n; 13 | 14 | 15 | 16 | for(i=0;i 2 | double Fibonacci(int); 3 | int main(void) 4 | { 5 | int n; 6 | double Res; 7 | printf("\nEnter The Term To Be Printed..."); 8 | scanf("%d", &n); 9 | Res=Fibonacci(n); 10 | printf("The %dth Term In The Fibonacci Series Is...%.0f\n", n, Res); 11 | return 0; 12 | } 13 | double Fibonacci(int n) 14 | { 15 | int a=0, b=1; 16 | double c=0; 17 | if(n==1) 18 | return 0; 19 | for(int i=2;i<=n;i++) 20 | { 21 | a=b; 22 | b=c; 23 | c=a+b; 24 | } 25 | return c; 26 | } 27 | -------------------------------------------------------------------------------- /December-04/c_RohitMidha23.c: -------------------------------------------------------------------------------- 1 | #include 2 | int fib(int n) 3 | { 4 | if (n <= 1) 5 | return n; 6 | return fib(n-1) + fib(n-2); 7 | } 8 | 9 | int main () 10 | { 11 | int n; 12 | printf("Enter value of n: "); 13 | scanf("%d",&n); 14 | printf("%d\n", fib(n+1)); 15 | //n+1 as fib(0) gives 0 but for user comfortability we make the 1st Fibonacci number as 0 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /December-04/c_Sushmakarunakaran: -------------------------------------------------------------------------------- 1 | #include 2 | void main () 3 | { int j; 4 | do 5 | { 6 | int n,num,i,f=0,s=1; 7 | printf("\n \t \t enter the number of digits to be printed in FIBONACCI series"); 8 | scanf("%d",&num); 9 | if(num<1) 10 | printf("\n \t \t enter a valid number"); 11 | else 12 | { 13 | for(i=0;i 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int n, t1 = -1, t2 = 1, nextTerm = 0; 7 | 8 | cout << "Enter the nth terms: "; 9 | cin >> n; 10 | 11 | 12 | for (int i = 1; i <= n; ++i) 13 | { 14 | // Prints the first two terms. 15 | 16 | nextTerm = t1 + t2; 17 | t1 = t2; 18 | t2 = nextTerm; 19 | } 20 | cout<<"nth term is :" << nextTerm << " "; 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /December-04/cpp_imhphari.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int f[100],i,n; 7 | f[0]=0;f[1]=1; 8 | 9 | 10 | cout<<"Enter the position to find in fibonacci sequence: "; 11 | cin>>n; 12 | for(i=2;i0 : 13 | num3=num1+num2 14 | print(num1) 15 | num1=num2 16 | num2=num3 17 | term-=1 18 | 19 | def main(): 20 | terms=int(input("enter the number of terms")) 21 | fib(terms) 22 | if __name__ == '__main__': 23 | main() 24 | 25 | -------------------------------------------------------------------------------- /December-04/python_aashish2000_fibonacci.py: -------------------------------------------------------------------------------- 1 | def fibonacci(n): 2 | if(n==0): 3 | return(0) 4 | elif(n==1): 5 | return(1) 6 | else: 7 | return(fibonacci(n-1)+fibonacci(n-2)) 8 | 9 | n=int(input("Enter n: ")) 10 | val=fibonacci(n-1) 11 | print(val) 12 | -------------------------------------------------------------------------------- /December-04/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 4 2 | def fib(n): 3 | f = list() 4 | f.append(0) 5 | f.append(1) 6 | for i in range(2, n): 7 | f.append(f[i - 1] + f[i - 2]) 8 | return f[n - 1] 9 | 10 | 11 | num = int(input("Enter the value of n ")) 12 | print(f"The number {num} in the Fibonacci Series is {fib(num)}") 13 | 14 | # SAMPLE I/O 15 | # Enter the value of n 5 16 | # The number 5 in the Fibonacci Series is 3 17 | -------------------------------------------------------------------------------- /December-04/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-04/python_harshith_FibonacciSeries.py: -------------------------------------------------------------------------------- 1 | def fibonacci(n): 2 | if(n <= 1): 3 | return n 4 | else: 5 | return(fibonacci(n-1) + fibonacci(n-2)) 6 | n = int(input("Enter number of terms:")) 7 | print("Fibonacci sequence:") 8 | a=[] 9 | for i in range(n): 10 | b=fibonacci(i) 11 | a.append(b) 12 | 13 | print(a[-1]) 14 | -------------------------------------------------------------------------------- /December-04/python_nivethitharajendran_4fibanocci.py.py: -------------------------------------------------------------------------------- 1 | #getting a number from the user 2 | n=int(input("Enter the nth number:")) 3 | #function definition 4 | def fibo(num): 5 | if num ==0: 6 | return 0 7 | elif num==1: 8 | return 1 9 | else: 10 | #calling recursively 11 | return fibo(num-1)+fibo(num-2) 12 | #function call 13 | x=fibo(n) 14 | #displaying the output 15 | print("The",n,"th element is ",x) 16 | -------------------------------------------------------------------------------- /December-04/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | def fibo(n): 2 | if n==0: 3 | return 0 4 | elif n==1: 5 | return 1 6 | else: 7 | return(fibo(n-1)+fibo(n-2)) 8 | n=int(input("enter the nth number in fibonacci series")) 9 | if n<1: 10 | print("enter a valid no") 11 | else: 12 | print("fibonnaci of ",n,"th term is",fibo(n-1)) 13 | -------------------------------------------------------------------------------- /December-04/python_raf1800.py: -------------------------------------------------------------------------------- 1 | def Fib(n): 2 | first = 0 3 | second = 1 4 | for i in range(0,n): 5 | print(first,end=" ") 6 | ne = first + second 7 | first = second 8 | second = ne 9 | 10 | 11 | 12 | def main(): 13 | n=int((input("Enter number of series elements: "))) 14 | Fib(n) 15 | 16 | if __name__ == "__main__": 17 | main() 18 | -------------------------------------------------------------------------------- /December-04/python_sartsha.py: -------------------------------------------------------------------------------- 1 | def fibo(nth): 2 | if nth == 1: 3 | return 0 4 | elif nth in [2,3]: 5 | return 1 6 | else: 7 | ans = fibo(nth-1)+fibo(nth-2) 8 | return ans 9 | n = int(input()) 10 | print(fibo(n)) 11 | -------------------------------------------------------------------------------- /December-04/python_shrufire.py: -------------------------------------------------------------------------------- 1 | def fib(n): 2 | a=0 3 | b=1 4 | if n==1: 5 | c=a 6 | elif n==2: 7 | c=b 8 | while (n-2)>0: 9 | c=a+b 10 | a=b 11 | b=c 12 | n=n-1 13 | return c 14 | n=int(input('Enter the value of N(Nth term): ')) 15 | if n>3: 16 | print(n,'th term of the Fibonacci Series is ',fib(n)) 17 | elif n==3: 18 | print(n,'rd term of the Fibonacci Series is ',fib(n)) 19 | elif n==2: 20 | print(n,'nd term of the Fibonacci Series is ',fib(n)) 21 | elif n==1: 22 | print(n,'th term of the Fibonacci Series is ',fib(n)) 23 | else: 24 | print('Invalid Input') 25 | -------------------------------------------------------------------------------- /December-04/python_surudhi.py: -------------------------------------------------------------------------------- 1 | def fib(n): 2 | a=0 3 | b=1 4 | if n==1: 5 | c=a 6 | elif n==2: 7 | c=b 8 | while (n-2)>0: 9 | c=a+b 10 | a=b 11 | b=c 12 | n=n-1 13 | return c 14 | n=int(input('Enter the value of N(Nth term): ')) 15 | if n>3: 16 | print(n,'th term of the Fibonacci Series is ',fib(n)) 17 | elif n==3: 18 | print(n,'rd term of the Fibonacci Series is ',fib(n)) 19 | elif n==2: 20 | print(n,'nd term of the Fibonacci Series is ',fib(n)) 21 | elif n==1: 22 | print(n,'th term of the Fibonacci Series is ',fib(n)) 23 | else: 24 | print('Invalid Input') 25 | -------------------------------------------------------------------------------- /December-05/C++_koushika.CPP: -------------------------------------------------------------------------------- 1 | /* 2 | Author: Koushika Kesavan 3 | Date of Creation: 28 December 2018, Wednesday 4 | Title: The Tower of Hanoi 5 | All rights reserved 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | void towers(int n, char frompeg, char topeg, char auxpeg) 12 | { 13 | if(n==1) 14 | { 15 | cout<"<"<>n; 28 | towers(n,'A','C','B');//A-->LEFT,C-->RIGHT,B-->MIDDLE 29 | getch(); 30 | } 31 | -------------------------------------------------------------------------------- /December-05/C_5 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int i=1; 3 | void tower(int,char[],char[],char[]); 4 | int main() 5 | { 6 | int n; 7 | char rod1[]="left",rod2[]="middle",rod3[]="right"; 8 | printf("Enter the number of disks "); 9 | scanf("%d",&n); 10 | tower(n,rod1,rod3,rod2); 11 | return 0; 12 | } 13 | void tower(int n,char rod1[],char rod3[],char rod2[]) 14 | { 15 | if(n==1) 16 | { 17 | printf("\n%d. %s => %s",i++,rod1,rod3); 18 | return; 19 | } 20 | tower(n-1,rod1,rod2,rod3); 21 | printf("\n%d. %s => %s",i++,rod1,rod3); 22 | tower(n-1,rod2,rod3,rod1); 23 | } 24 | -------------------------------------------------------------------------------- /December-05/c_Nilesh2000.c: -------------------------------------------------------------------------------- 1 | # include 2 | void towerOfHanoi(int, char[], char[], char[]); 3 | int main(void) 4 | { 5 | int n; 6 | char Rod1[]="left", Rod2[]="middle", Rod3[]="right"; 7 | printf("\nInput Number Of Disks : "); 8 | scanf("%d", &n); 9 | towerOfHanoi(n, Rod1, Rod3, Rod2); 10 | printf("\n"); 11 | return 0; 12 | } 13 | void towerOfHanoi(int n, char Tower1[], char Tower3[], char Tower2[]) 14 | { 15 | if(n==1) 16 | { 17 | printf("\n%s => %s", Tower1, Tower3); 18 | return ; 19 | } 20 | towerOfHanoi(n-1, Tower1, Tower2, Tower3); 21 | printf("\n%s => %s", Tower1, Tower3); 22 | towerOfHanoi(n-1, Tower2, Tower3, Tower1); 23 | } 24 | -------------------------------------------------------------------------------- /December-05/c_RohitMidha23.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void towerOfHanoi(int n, char from, char to, char extra) 4 | { 5 | if (n == 1) 6 | { 7 | printf("\n Move disk 1 from rod %c to rod %c", from, to); 8 | return; 9 | } 10 | towerOfHanoi(n-1, from, extra, to); 11 | printf("\n Move disk %d from rod %c to rod %c", n, from, to); 12 | towerOfHanoi(n-1, extra, to, from); 13 | } 14 | 15 | int main() 16 | { 17 | int n; 18 | printf("Enter number of disks, n: "); 19 | scanf("%d",&n); 20 | towerOfHanoi(n, 'L', 'R', 'M'); 21 | printf("\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /December-05/c_Sushmakarunakaran.c: -------------------------------------------------------------------------------- 1 | #include 2 | void towerofhanoi(int n,char a[5],char b[5],char c[5]) 3 | { 4 | if(n==1) 5 | { 6 | printf("\n%s to %s",a,c); 7 | return; 8 | } 9 | towerofhanoi(n-1,a,c,b); 10 | printf("\n%s to %s",a,c); 11 | towerofhanoi(n-1,b,a,c); 12 | } 13 | void main() 14 | { int e; 15 | do{ 16 | char l[5]="left", m[5]="mid", r[5]= "right"; 17 | int d; 18 | printf("Enter number of discs"); 19 | scanf("%d",&d); 20 | printf("\n The order of movement of discs:"); 21 | towerofhanoi(d,l,m,r); 22 | printf("/n enter 1 to continue and 0 to exit"); 23 | scanf("%d",&e); 24 | }while(e>0); 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /December-05/c_crytotech.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | // C recursive function to solve tower of hanoi puzzle 5 | void towerOfHanoi(int n, char from_rod, char to_rod, char aux_rod) 6 | { 7 | if (n == 1) 8 | { 9 | printf("\n Move disk 1 from %c -> %c", from_rod, to_rod); 10 | return; 11 | } 12 | towerOfHanoi(n-1, from_rod, aux_rod, to_rod); 13 | printf("\n Move disk %d from %c -> %c", n, from_rod, to_rod); 14 | towerOfHanoi(n-1, aux_rod, to_rod, from_rod); 15 | } 16 | 17 | int main() 18 | { 19 | int n = 0; // Number of disks 20 | printf("Enter the number of disk :"); 21 | scanf("%d",&n); 22 | towerOfHanoi(n, 'L', 'R', 'M'); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /December-05/c_kumaran_hanoi.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // C recursive function to solve tower of hanoi puzzle 4 | void towerOfHanoi(int n, char from_rod[], char to_rod[], char aux_rod[]) 5 | { 6 | if (n == 1) 7 | { 8 | cout<<"\n"< 2 | using namespace std; 3 | 4 | void toh(int n,char a ,char c,char b){ 5 | if(n==1){ 6 | cout<<"Move disk 1 from "<>n; 21 | toh(n, 'A', 'C', 'B'); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /December-05/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | def TowerOfHanoi(n , fro, to, mid): 2 | if n == 1: 3 | print ( 4 | "Move disk 1 from rod",fro,"to rod",to) 5 | return 6 | TowerOfHanoi(n-1, fro, mid, to) 7 | print ("Move disk",n,"from rod",fro,"to rod",to) 8 | TowerOfHanoi(n-1, mid, to, fro) 9 | 10 | n = int(input('Enter order')) 11 | TowerOfHanoi(n, 'A', 'C', 'B') 12 | -------------------------------------------------------------------------------- /December-05/py_anuppriya_towershanoi.py: -------------------------------------------------------------------------------- 1 | def moveTower(height,fromPole, toPole, withPole): 2 | if height >= 1: 3 | moveTower(height-1,fromPole,withPole,toPole) 4 | moveDisk(fromPole,toPole) 5 | moveTower(height-1,withPole,toPole,fromPole) 6 | 7 | def moveDisk(fp,tp): 8 | 9 | print(fp,"=>",tp) 10 | 11 | print("TOWERS OF HANOI") 12 | n=int(input("Enter the number of disks: ")) 13 | print("Moving disk from: ") 14 | 15 | moveTower(n,"Left","Right","Middle") 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /December-05/python_AkshayaRC.py: -------------------------------------------------------------------------------- 1 | def Hanoi(n,first,mid,last): 2 | if n >= 1: 3 | Hanoi(n-1,first,last,mid) 4 | print(first,"=>",last) 5 | Hanoi(n-1,mid,first,last) 6 | 7 | n=int(input("enter no.of disks: ")) 8 | Hanoi(n,'left','middle','right') 9 | -------------------------------------------------------------------------------- /December-05/python_MaddyDinesh_towerofhanoi.py: -------------------------------------------------------------------------------- 1 | #function to move disks 2 | def TowerOfHanoi(n , from_rod, to_rod, mid_rod): 3 | if n == 1: 4 | print( "Move disk 1 from rod",from_rod,"to rod",to_rod) 5 | return 6 | #recursive call 7 | TowerOfHanoi(n-1, from_rod, mid_rod, to_rod) 8 | print ("Move disk",n,"from rod",from_rod,"to rod",to_rod) 9 | TowerOfHanoi(n-1, mid_rod, to_rod, from_rod) 10 | 11 | #getting no.of disks from the user 12 | n=int(input("Enter the number of disks:")) 13 | #function call 14 | TowerOfHanoi(n, 'A', 'C', 'B') 15 | 16 | 17 | -------------------------------------------------------------------------------- /December-05/python_Raahul46_Tower_of_hanoi.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | """ 4 | Hi there. 5 | This file doesn't contain any code. 6 | It's just here to give an example of the file naming scheme. 7 | Cheers! 8 | """ 9 | def Movetower(height,fromPole, toPole, withPole): 10 | if height >= 1: 11 | Movetower(height-1,fromPole,withPole,toPole) 12 | Movedisk(fromPole,toPole) 13 | Movetower(height-1,withPole,toPole,fromPole) 14 | 15 | def Movedisk(fp,tp): 16 | print("moving disk from",fp,"to",tp) 17 | 18 | def main(): 19 | number=int(input("Enter no. of disks:")) 20 | Movetower(number,"A","B","C") 21 | 22 | if __name__ == '__main__': 23 | main() 24 | -------------------------------------------------------------------------------- /December-05/python_aashish2000_hanoi.py: -------------------------------------------------------------------------------- 1 | def moveTower(height,fromPole, toPole, withPole): 2 | if height >= 1: 3 | moveTower(height-1,fromPole,withPole,toPole) 4 | moveDisk(fromPole,toPole) 5 | moveTower(height-1,withPole,toPole,fromPole) 6 | 7 | def moveDisk(fp,tp): 8 | print(fp," => ",tp) 9 | 10 | 11 | disk=int(input("No of Disks: ")) 12 | print("Hanoi("+str(disk)+")") 13 | moveTower(disk,"left","right","middle") 14 | -------------------------------------------------------------------------------- /December-05/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 5 2 | def Hanoi(n, l='left', r='right', m='middle'): 3 | if n == 1: 4 | print(f"{l} => {r}") 5 | return 6 | Hanoi(n-1, l, m, r) 7 | print(f"{l} => {r}") 8 | Hanoi(n-1, m, r, l) 9 | 10 | 11 | num = int(input("Number of disks ")) 12 | Hanoi(num) 13 | 14 | # SAMPLE I/O 15 | # Number of disks 3 16 | # left => right 17 | # left => middle 18 | # right => middle 19 | # left => right 20 | # middle => left 21 | # middle => right 22 | # left => right 23 | -------------------------------------------------------------------------------- /December-05/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-05/python_harshith_TowerofHanoi.py: -------------------------------------------------------------------------------- 1 | def moveTower(height,frompole, topole, withpole): 2 | if height >= 1: 3 | moveTower(height-1,frompole,withpole,topole) 4 | moveDisk(frompole,topole) 5 | moveTower(height-1,withpole,topole,frompole) 6 | 7 | def moveDisk(fp,tp): 8 | print("moving disk from",fp,"to",tp) 9 | a=int(input("Enter the number of disks")) 10 | moveTower(a,"A","B","C") 11 | -------------------------------------------------------------------------------- /December-05/python_nivethitharajendran_5towerofhanoi.py.py: -------------------------------------------------------------------------------- 1 | #function to move disks 2 | def TowerOfHanoi(n , from_rod, to_rod, mid_rod): 3 | if n == 1: 4 | print( "Move disk 1 from rod",from_rod,"to rod",to_rod) 5 | return 6 | #recursive call 7 | TowerOfHanoi(n-1, from_rod, mid_rod, to_rod) 8 | print ("Move disk",n,"from rod",from_rod,"to rod",to_rod) 9 | TowerOfHanoi(n-1, mid_rod, to_rod, from_rod) 10 | 11 | #getting no.of disks from the user 12 | n=int(input("Enter the number of disks:")) 13 | #function call 14 | TowerOfHanoi(n, 'A', 'C', 'B') 15 | 16 | 17 | -------------------------------------------------------------------------------- /December-05/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | def moveTower(height,frompole, topole, withpole): 2 | if height >= 1: 3 | moveTower(height-1,frompole,withpole,topole) 4 | moveDisk(frompole,topole) 5 | moveTower(height-1,withpole,topole,frompole) 6 | 7 | def moveDisk(fp,tp): 8 | print("moving disk from",fp,"to",tp) 9 | a=int(input("Enter the number of disks")) 10 | moveTower(a,"A","B","C") 11 | -------------------------------------------------------------------------------- /December-05/python_raf1800.py: -------------------------------------------------------------------------------- 1 | def Hanoi(n,lt,rt,mt): 2 | if n >= 1: 3 | Hanoi(n-1,lt,mt,rt) 4 | print(lt + " => " + rt) 5 | Hanoi(n-1,mt,rt,lt) 6 | 7 | 8 | 9 | def main(): 10 | n=int((input("Enter number of disks in left tower: "))) 11 | Hanoi(n,"Left","Right","Middle") 12 | 13 | if __name__ == "__main__": 14 | main() 15 | -------------------------------------------------------------------------------- /December-05/python_sartsha.py: -------------------------------------------------------------------------------- 1 | def Hanoi(n,frm='left',mid='middle',to='right'): 2 | if(n>0): 3 | Hanoi(n-1,frm,to,mid) 4 | print(frm+"=>"+to) 5 | Hanoi(n-1,mid,frm,to) 6 | 7 | n = int(input('Number of disks: ')) 8 | Hanoi(n) 9 | -------------------------------------------------------------------------------- /December-05/python_shrufire.py: -------------------------------------------------------------------------------- 1 | def moveDisk(fp,tp): 2 | print(fp,"=>",tp) 3 | def moveTower(height,fromPole, toPole, withPole): 4 | if height >= 1: 5 | moveTower(height-1,fromPole,withPole,toPole) 6 | moveDisk(fromPole,toPole) 7 | moveTower(height-1,withPole,toPole,fromPole) 8 | def Hanoi(n): 9 | moveTower(n,"left","right","middle") 10 | height=int(input('Enter the number of disks: ')); 11 | Hanoi(height) 12 | 13 | -------------------------------------------------------------------------------- /December-05/python_surudhi.py: -------------------------------------------------------------------------------- 1 | def moveDisk(fp,tp): 2 | print(fp,"=>",tp) 3 | def moveTower(height,fromPole, toPole, withPole): 4 | if height >= 1: 5 | moveTower(height-1,fromPole,withPole,toPole) 6 | moveDisk(fromPole,toPole) 7 | moveTower(height-1,withPole,toPole,fromPole) 8 | def Hanoi(n): 9 | moveTower(n,"left","right","middle") 10 | height=int(input('Enter the number of disks: ')); 11 | Hanoi(height) 12 | 13 | -------------------------------------------------------------------------------- /December-06/C_6 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int gcd(int,int); 3 | int main() 4 | { 5 | int a[10],n,lcm=1,i; 6 | printf("Enter no. of elements "); 7 | scanf("%d",&n); 8 | printf("Enter the elements "); 9 | for(i=0;ib) 23 | return gcd(a-b,b); 24 | else 25 | return gcd(a,b-a); 26 | } 27 | return a; 28 | } 29 | -------------------------------------------------------------------------------- /December-06/c++_kumaran_lcm.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int num1, num2, i, gcd, lcm; 7 | 8 | cout << "Enter two numbers: " << endl; 9 | cin >> num1 >> num2; 10 | 11 | //calculation of gcd 12 | for(i=1; i <= num1 && i <= num2; ++i) 13 | { 14 | if(num1 % i == 0 && num2 % i == 0) 15 | gcd = i; 16 | } 17 | //calculation of lcm using gcd 18 | lcm = (num1 * num2) / gcd; 19 | cout << "LCM: " << lcm << endl; 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /December-06/c_Nilesh2000.c: -------------------------------------------------------------------------------- 1 | # include 2 | int calcGCD(int x, int y) 3 | { 4 | if(y==0) 5 | return x; 6 | return calcGCD(y, x%y); 7 | } 8 | void main() 9 | { 10 | int Num1, Num2; 11 | printf("\nInput: "); 12 | scanf("%d %d", &Num1, &Num2); 13 | int GCD=calcGCD(Num1, Num2); 14 | int LCM=(Num1*Num2)/GCD; 15 | printf("Output: %d\n", LCM); 16 | } 17 | -------------------------------------------------------------------------------- /December-06/c_RohitMidha23.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int gcd(int a,int b) 4 | { 5 | 6 | if (a == 0) 7 | return b; 8 | return gcd(b % a, a); 9 | } 10 | int findLCM(int arr[], int n) 11 | { 12 | int result = arr[0]; 13 | 14 | for (int i = 1; i < n; i++) 15 | result = (((arr[i] * result)) / 16 | (gcd(arr[i], result))); 17 | 18 | return result; 19 | } 20 | 21 | 22 | int main() 23 | { 24 | int a[10]; int n; 25 | printf("Enter number of elements: "); 26 | scanf("%d",&n); 27 | printf("\nEnter %d elements: ",n); 28 | for(int i=0;i 2 | int gcdfinder(int a,int b) 3 | { int i ,gcd; 4 | for(i=1; (i <= a) && (i <= b); ++i) 5 | { 6 | if(a%i==0 && b%i==0) 7 | gcd = i; 8 | } 9 | 10 | return gcd; 11 | } 12 | 13 | void main() 14 | { 15 | int lcm,n1,n2,g; 16 | printf(" \nenter the numbers to find lcm"); 17 | scanf("%d %d",&n1,&n2); 18 | g=gcdfinder(n1,n2); 19 | lcm=(n1*n2)/g; 20 | printf("\n the LCM is %d",lcm); 21 | } 22 | -------------------------------------------------------------------------------- /December-06/cpp_imhphari.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int gcd(int a,int b){ 5 | if(b==0) 6 | return a; 7 | return gcd(b,a%b); 8 | } 9 | 10 | int lcm(int arr[],int n) 11 | { 12 | int result=arr[0]; 13 | for (int i=1;i>n; 23 | int arr[n]; 24 | for(i=0;i>arr[i]; 26 | } 27 | int no=sizeof(arr)/sizeof(arr[0]); 28 | int s=lcm(arr,no); 29 | cout< 2 | void isApproximatelyEqual(float, float); 3 | int main(void) 4 | { 5 | float Num1, Num2; 6 | printf("\nInput Two Numbers : "); 7 | scanf("%f %f", &Num1, &Num2); 8 | isApproximatelyEqual(Num1, Num2); 9 | return 0; 10 | } 11 | void isApproximatelyEqual(float n1, float n2) 12 | { 13 | int i, j; 14 | i=n1; 15 | j=n2; 16 | if(n1-i>0.5) 17 | i++; 18 | if(n2-j>0.5) 19 | j++; 20 | if(i==j) 21 | printf("They are approximately equal.\n"); 22 | else 23 | printf("They are not approximately equal.\n"); 24 | } 25 | -------------------------------------------------------------------------------- /December-07/java_crytotech.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | import java.io.*; 3 | import java.lang.*; 4 | public class approximatelyEqual{ 5 | public static void main(String [] args){ 6 | System.out.println("Enter two numbers : "); 7 | Scanner s = new Scanner(System.in); 8 | float a= s.nextFloat(); 9 | float b= s.nextFloat(); 10 | float tolerancePercentage= s.nextFloat(); 11 | float diff = Math.abs(a - b); 12 | float tolerance = tolerancePercentage/100 * a; 13 | if(diff < tolerance){ 14 | System.out.println("They are approximately equal!"); 15 | } 16 | else{ 17 | System.out.println("They are NOT approximately equal!"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /December-07/py_anuppriya_approxeq.py: -------------------------------------------------------------------------------- 1 | def roun(a,b): 2 | c=round(a) 3 | d=round(b) 4 | if(c==d): 5 | print("True.They are approximately equal") 6 | else: 7 | print("False") 8 | 9 | 10 | n1=float(input("Number 1:")) 11 | n2=float(input("Number 2:")) 12 | roun(n1,n2) 13 | -------------------------------------------------------------------------------- /December-07/python_AkshayaRC.py: -------------------------------------------------------------------------------- 1 | def IsApproximate(num1,num2): 2 | if round(num1)==round(num2): 3 | print("true") 4 | else: 5 | print("false") 6 | def IsApproximatelyEqual(num1,num2,t): 7 | if abs(num1-num2)>t: 8 | print("false") 9 | else: 10 | print("true") 11 | print("Enter two numbers") 12 | num1=float(input()) 13 | num2=float(input()) 14 | ans=input("With tolerance level? (yes/no)") 15 | if ans=="no": 16 | IsApproximate(num1,num2) 17 | if ans=="yes": 18 | t=float(input("tolerance level:")) 19 | IsApproximatelyEqual(num1,num2,t) 20 | -------------------------------------------------------------------------------- /December-07/python_MaddyDinesh_approximateequal.py: -------------------------------------------------------------------------------- 1 | from decimal import Decimal 2 | n=int(input("1.without tolerance 2.with tolerance")) 3 | if n==1: 4 | a=float(input("enter the 1st number")) 5 | b=float(input("enter the 2nd number")) 6 | x=round(a) 7 | y=round(b) 8 | if x==y: 9 | print("approximate equal") 10 | else: 11 | print("not equal") 12 | else: 13 | a=Decimal(input("enter the 1st number")) 14 | b=Decimal(input("enter the 2nd number")) 15 | c=float(input("enter tolerance")) 16 | x=float(a-b) 17 | if x==c: 18 | print("approximate equal") 19 | else: 20 | print("not equal") -------------------------------------------------------------------------------- /December-07/python_Raahul46_Approx_equal.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | """ 4 | Hi there. 5 | This file doesn't contain any code. 6 | It's just here to give an example of the file naming scheme. 7 | Cheers! 8 | """ 9 | def roundnum(num,dgt): 10 | return (round(num,dgt)) 11 | 12 | def main(): 13 | num=float(input("Enter the decimal number:")) 14 | round=int(input("No. of digits to be rounded off:")) 15 | result=roundnum(num,round) 16 | 17 | print("Round off value is:",result) 18 | if __name__ == '__main__': 19 | main() 20 | -------------------------------------------------------------------------------- /December-07/python_RohitMidha23.py: -------------------------------------------------------------------------------- 1 | def isAproximatelyEqual(a,b): 2 | if(round(a)==round(b)): 3 | print("isAproximatelyEqual("+str(a)+","+str(b)+") = true\n") 4 | else: 5 | print("isAproximatelyEqual("+str(a)+","+str(b)+") = false\n") 6 | 7 | 8 | a = float(input("Enter 1st number : ")) 9 | 10 | b = float(input("Enter 1st number : ")) 11 | 12 | isAproximatelyEqual(a,b) -------------------------------------------------------------------------------- /December-07/python_aashish2000_round.py: -------------------------------------------------------------------------------- 1 | def roundno(val,dec,tol,chk): 2 | print("IsApproximatelyEqual("+str(val)+","+str(dec),end="") 3 | if(chk==1): 4 | print(","+str(tol)+") -> ",end="") 5 | else: 6 | print(") -> ",end="") 7 | 8 | 9 | if(abs(val-dec)<=0.5 and abs(val-dec)<=tol): 10 | out="True" 11 | else: 12 | out="False" 13 | print(out) 14 | 15 | inp=list(map(float,input().split())) 16 | if(len(inp)==2): 17 | roundno(inp[0],inp[1],inp[0],0) 18 | else: 19 | roundno(inp[0],inp[1],inp[2],1) 20 | 21 | -------------------------------------------------------------------------------- /December-07/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 7 2 | def IsApproximatelyEqual(a, b): 3 | b = round(b) 4 | a = round(a) 5 | return (a == b) 6 | 7 | 8 | a, b = map(float, input("Enter the two numbers ").split()) 9 | print(IsApproximatelyEqual(a, b)) 10 | 11 | # SAMPLE I/O 12 | # Enter the two numbers 3.0 2.5706 13 | # True 14 | -------------------------------------------------------------------------------- /December-07/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-07/python_harshith_Approximation.py: -------------------------------------------------------------------------------- 1 | x=float(input('Enter number 1: ')) 2 | y=float(input('Enter number 2: ')) 3 | a=round(x) 4 | b=round(y) 5 | if a==b: 6 | print("True") 7 | else: 8 | print("False") 9 | -------------------------------------------------------------------------------- /December-07/python_kumaran_equal.py: -------------------------------------------------------------------------------- 1 | from decimal import Decimal 2 | #python language 3 | #getting input from user 4 | a=float(input("Enter the 1st number:")) 5 | b=float(input("Enter the 2nd number:")) 6 | #rounding off the values 7 | x=round(a) 8 | y=round(b) 9 | if x==y: 10 | print("approximately equal") 11 | else: 12 | print("not equal") 13 | -------------------------------------------------------------------------------- /December-07/python_nivethitharajendran_7approximatelyequal.py.py: -------------------------------------------------------------------------------- 1 | from decimal import Decimal 2 | #getting input from user 3 | a=float(input("Enter the 1st number:")) 4 | b=float(input("Enter the 2nd number:")) 5 | #rounding off the values 6 | x=round(a) 7 | y=round(b) 8 | if x==y: 9 | print("approximately equal") 10 | else: 11 | print("not equal") 12 | 13 | -------------------------------------------------------------------------------- /December-07/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | from decimal import Decimal 2 | n=int(input("1.without tolerance 2.with tolerance")) 3 | if n==1: 4 | a=float(input("enter the 1st number")) 5 | b=float(input("enter the 2nd number")) 6 | x=round(a) 7 | y=round(b) 8 | if x==y: 9 | print("approximate equal") 10 | else: 11 | print("not equal") 12 | else: 13 | a=Decimal(input("enter the 1st number")) 14 | b=Decimal(input("enter the 2nd number")) 15 | c=float(input("enter tolerance")) 16 | x=float(a-b) 17 | if x==c: 18 | print("approximate equal") 19 | else: 20 | print("not equal") 21 | -------------------------------------------------------------------------------- /December-07/python_raf1800.py: -------------------------------------------------------------------------------- 1 | def IsApprox(n1,n2,t): 2 | print (abs(n1 - n2) <= t) 3 | 4 | def main(): 5 | n1 = float(input("Enter a number: ")) 6 | n2 = float(input("Enter another number: ")) 7 | t = float(input("Enter Tolerance level: ")) 8 | IsApprox(n1,n2,t) 9 | 10 | if __name__ == "__main__": 11 | main() 12 | -------------------------------------------------------------------------------- /December-07/python_sartsha.py: -------------------------------------------------------------------------------- 1 | def IsApproximatelyEqual(a,b,t): 2 | if t.strip()=='': 3 | a = int(a+0.5) 4 | b = int(b+0.5) 5 | if a==b: 6 | return True 7 | else: 8 | return False 9 | else: 10 | t = float(t) 11 | diff = a-b 12 | if diff<0: 13 | diff = -1.0*diff 14 | if diff<=t: 15 | return True 16 | else: 17 | return False 18 | a = float(input('Enter first number ')) 19 | b = float(input('Enter second number ')) 20 | th =input('Enter tolerance (leave empty if NA) ') 21 | print(IsApproximatelyEqual(a,b,th)) 22 | -------------------------------------------------------------------------------- /December-07/python_shrufire.py: -------------------------------------------------------------------------------- 1 | def round(n): 2 | i=n-int(n) 3 | if i: 4 | if i>0.5: 5 | n=float(int(n)+1) 6 | return n 7 | else: 8 | n=float(int(n)-1) 9 | return n 10 | else: 11 | return n 12 | a=float(input('Enter the first number: ')) 13 | b=float(input('Enter the second number: ')) 14 | tol=float(input('Enter the tolerance level: ')) 15 | c=round(a) 16 | d=round(b) 17 | if (c==d) and abs(a-b)0.5: 5 | n=float(int(n)+1) 6 | return n 7 | else: 8 | n=float(int(n)-1) 9 | return n 10 | else: 11 | return n 12 | a=float(input('Enter the first number: ')) 13 | b=float(input('Enter the second number: ')) 14 | tol=float(input('Enter the tolerance level: ')) 15 | c=round(a) 16 | d=round(b) 17 | if (c==d) and abs(a-b)1 : 13 | p = inflect.engine() 14 | print([p.plural(word) for word in words.split(' ')]) 15 | 16 | else: 17 | print(words) 18 | 19 | 20 | def main(): 21 | 22 | word=str(input("ENTER THE WORD:")) 23 | num=int(input("ENTER THE NUMBER 1->SINGULAR/2->PLURAL:")) 24 | plural(word,num) 25 | 26 | if __name__ == '__main__': 27 | main() 28 | -------------------------------------------------------------------------------- /December-08/python_RohitMidha23.py: -------------------------------------------------------------------------------- 1 | import inflect 2 | 3 | def plural(words,n): 4 | if n > 1 : 5 | p = inflect.engine() 6 | print([p.plural(word) for word in words.split(' ')]) 7 | 8 | else: 9 | print(words) 10 | 11 | word=str(input("Enter Word: :")) 12 | num=int(input("Enter Choice : 1. Singular 2. Plural :")) 13 | plural(word,num) 14 | -------------------------------------------------------------------------------- /December-08/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-08/python_harshith_SINGULAR PLURAL.py: -------------------------------------------------------------------------------- 1 | import inflect 2 | p=inflect.engine() 3 | a=input("Enter the first parameter") 4 | b=input("Enter the second parameter") 5 | if b.isnumeric() : 6 | if b=="1" or b=="-1": 7 | if a[-1]=="s": 8 | print(p.plural(a)) 9 | else: 10 | print(a) 11 | else: 12 | if a[-1]=="s": 13 | print(a) 14 | else: 15 | print(p.plural(a)) 16 | else: 17 | if a[1]==b[1]: 18 | if a[-1]=="s": 19 | d=p.plural(a) 20 | print("SINGULAR:",d) 21 | print("PLURAL:",a) 22 | else: 23 | d=p.plural(a) 24 | print("SINGULAR:",a) 25 | print("PLURAL:",d) 26 | else: 27 | print("INVALID INPUT") 28 | -------------------------------------------------------------------------------- /December-08/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | import inflect 2 | p=inflect.engine() 3 | a=input("Enter the first parameter") 4 | z=a[1] 5 | b=input("Enter the second parameter") 6 | if b.isnumeric() : 7 | if b=="1" or b=="-1": 8 | if a[-1]=="s": 9 | print(p.plural(a)) 10 | else: 11 | print(a) 12 | else: 13 | if a[-1]=="s": 14 | print(a) 15 | else: 16 | print(p.plural(a)) 17 | else: 18 | if a[1]==b[1]: 19 | if a[-1]=="s": 20 | b=p.plural(a) 21 | print("SINGULAR:",b) 22 | print("PLURAL:",a) 23 | else: 24 | b=p.plural(a) 25 | print("SINGULAR:",a) 26 | print("PLURAL:",b) 27 | else: 28 | print("INVALID INPUT") 29 | -------------------------------------------------------------------------------- /December-08/python_sartsha.py: -------------------------------------------------------------------------------- 1 | import inflect 2 | p = inflect.engine() 3 | a=input("input 1 :") 4 | b=input("input 2 :") 5 | if b.isdigit(): 6 | if b not in ['-1','1']: 7 | if a[-1]!="s": 8 | print(p.plural(a)) 9 | else : 10 | print (a) 11 | else : 12 | if a[-1]== "s" : 13 | print(a[:-1]) 14 | else : 15 | print(a) 16 | else : 17 | if a[1:3]== b[1:3] : 18 | if a[-1]== "s" : 19 | e = p.plural(a) 20 | print ("singular :",e) 21 | print ("plural :",a) 22 | else : 23 | f = p.plural(a) 24 | print ("singular :",a) 25 | print ("plural :",f) 26 | else : 27 | print ("invalid input") 28 | -------------------------------------------------------------------------------- /December-09/Python_Nilesh2000.py: -------------------------------------------------------------------------------- 1 | import validators as vd 2 | 3 | def isUrl(Link): 4 | Res=vd.url(Link) 5 | 6 | if(Res==True): 7 | print("True") 8 | else: 9 | print("False") 10 | 11 | Str=input("Enter The URL To Be Checked : ") 12 | isUrl(Str) 13 | -------------------------------------------------------------------------------- /December-09/java_crytotech.java: -------------------------------------------------------------------------------- 1 | // Java program to check if a URL is valid 2 | import java.net.URL; 3 | 4 | public class Test { 5 | 6 | /* Returns true if url is valid */ 7 | public static boolean isValid(String url) 8 | { 9 | try { 10 | new URL(url).toURI(); 11 | return true; 12 | } 13 | catch (Exception e) { 14 | return false; 15 | } 16 | } 17 | 18 | public static void main(String[] args) 19 | { 20 | Scanner s = new Scanner(System.in); 21 | String url = s.nextLine(); 22 | if (isValid(url)) 23 | System.out.println("Yes"); 24 | else 25 | System.out.println("No"); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /December-09/py_9 AJShalini21.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # In[ ]: 5 | 6 | 7 | #!/usr/bin/env python 8 | # coding: utf-8 9 | 10 | # In[6]: 11 | 12 | 13 | import validators 14 | a=input ("enter the string") 15 | validators.url(a) 16 | 17 | 18 | # In[ ]: 19 | 20 | 21 | import validators 22 | validators.url("http://google.com") 23 | True 24 | validators.url("http://google") 25 | ValidationFailure(func=url, args={'value': 'http://google', 'require_tld': True}) 26 | if not validators.url("http://google"): 27 | print "not valid" 28 | 29 | not valid 30 | 31 | -------------------------------------------------------------------------------- /December-09/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | import validators 2 | def isurl(s): 3 | if validators.url(s): 4 | print('Yes') 5 | else: 6 | print('no') 7 | 8 | s = input('Enter url') 9 | isurl(s) -------------------------------------------------------------------------------- /December-09/py_anuppriya_url.py: -------------------------------------------------------------------------------- 1 | import re 2 | def check(s): 3 | if(re.match('https?://(www\.)?(\w+)(\.\w+)',s)): 4 | return True 5 | else: 6 | return False 7 | 8 | 9 | s=input("Enter the URL : ") 10 | print(check(s)) 11 | -------------------------------------------------------------------------------- /December-09/py_imhphari.py: -------------------------------------------------------------------------------- 1 | from urllib.parse import urlparse 2 | 3 | def is_url(url): 4 | return bool(urlparse(url).netloc) 5 | -------------------------------------------------------------------------------- /December-09/python_AkshayaRC.py: -------------------------------------------------------------------------------- 1 | import re 2 | def IsURL(url): 3 | match=re.search(r'^http|https://.*$',url) 4 | mat=re.search(r'.com',url) 5 | if match and mat: 6 | print("true") 7 | else: 8 | print("false") 9 | url=input("Enter url: ") 10 | IsURL(url) 11 | -------------------------------------------------------------------------------- /December-09/python_MaddyDinesh_isthisanurl.py: -------------------------------------------------------------------------------- 1 | 2 | import validators 3 | url=input("ENTER THE INPUT") 4 | a=validators.url(url) 5 | if a: 6 | print("TRUE") 7 | else: 8 | print("FALSE") -------------------------------------------------------------------------------- /December-09/python_Raahul46_IS_THIS_URL.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | """ 4 | Hi there. 5 | This file doesn't contain any code. 6 | It's just here to give an example of the file naming scheme. 7 | Cheers! 8 | """ 9 | 10 | import validators 11 | def isurl(link): 12 | value=validators.url(link) 13 | 14 | if(value==True): 15 | print("It is a URL") 16 | else: 17 | print("It is not a URL") 18 | 19 | def main(): 20 | string=str(input("ENTER THE URL TO CHECK:")) 21 | isurl(string) 22 | if __name__ == '__main__': 23 | main() 24 | 25 | -------------------------------------------------------------------------------- /December-09/python_RohitMidha23.py: -------------------------------------------------------------------------------- 1 | from urllib2 import urlopen 2 | import urllib2 3 | 4 | def isURL(str): 5 | code = urlopen(str).code 6 | if (code/ 100 >= 4): 7 | return False 8 | if(code==200): 9 | return True 10 | 11 | str = raw_input("Please enter URL : ") 12 | if(isURL(str)): 13 | print("isURL("+str+")? True \n") 14 | else: 15 | print("isURL("+str+")? False \n") 16 | -------------------------------------------------------------------------------- /December-09/python_Sushmakarunakaran.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # In[6]: 5 | 6 | 7 | import validators 8 | a=input ("enter the string") 9 | validators.url(a) 10 | 11 | 12 | # In[ ]: 13 | 14 | 15 | import validators 16 | validators.url("http://google.com") 17 | True 18 | validators.url("http://google") 19 | ValidationFailure(func=url, args={'value': 'http://google', 'require_tld': True}) 20 | if not validators.url("http://google"): 21 | print "not valid" 22 | 23 | not valid 24 | 25 | -------------------------------------------------------------------------------- /December-09/python_aashish2000_IsURL.py: -------------------------------------------------------------------------------- 1 | import re 2 | string=input() 3 | print("IsURL(\""+string+"\")") 4 | regex = re.compile( 5 | r'^(?:http|ftp)s?://' 6 | r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' 7 | r'localhost|' 8 | r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' 9 | r'(?::\d+)?' 10 | r'(?:/?|[/?]\S+)$', re.IGNORECASE) 11 | 12 | print (re.match(regex, string) is not None) 13 | -------------------------------------------------------------------------------- /December-09/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 9 2 | import re 3 | 4 | 5 | def IsURL(s): 6 | pattern = re.compile(r'https://\w+\.\w+') 7 | res = pattern.search(s) 8 | if res: 9 | return True 10 | else: 11 | return False 12 | 13 | 14 | url = input("Enter URL ") 15 | print(IsURL(url)) 16 | 17 | # SAMPLE I/O 18 | # Enter URL https://duckduckgo.com 19 | # True 20 | -------------------------------------------------------------------------------- /December-09/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-09/python_harshith_URL_VALIDATION.py: -------------------------------------------------------------------------------- 1 | import validators 2 | url=input("ENTER THE INPUT") 3 | a=validators.url(url) 4 | if a: 5 | print("TRUE") 6 | else: 7 | print("FALSE") 8 | -------------------------------------------------------------------------------- /December-09/python_kumaran_url.py: -------------------------------------------------------------------------------- 1 | #python language 2 | import validators 3 | url=input("Enter the url:") 4 | a=validators.url(url) 5 | if a: 6 | print("TRUE") 7 | else: 8 | print("FALSE") 9 | -------------------------------------------------------------------------------- /December-09/python_nivethitharajendran_9url.py.py: -------------------------------------------------------------------------------- 1 | import validators 2 | url=input("Enter the url:") 3 | a=validators.url(url) 4 | if a: 5 | print("TRUE") 6 | else: 7 | print("FALSE") 8 | -------------------------------------------------------------------------------- /December-09/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | 2 | import validators 3 | url=input("ENTER THE INPUT") 4 | a=validators.url(url) 5 | if a: 6 | print("TRUE") 7 | else: 8 | print("FALSE") 9 | -------------------------------------------------------------------------------- /December-09/python_raf1800.py: -------------------------------------------------------------------------------- 1 | import re 2 | def IsURL(s): 3 | url = re.compile(r"https://\w+\.\w+") 4 | if url.search(s): 5 | print("True") 6 | else: 7 | print("False") 8 | 9 | def main(): 10 | s = input("Enter a string: ") 11 | IsURL(s) 12 | 13 | if __name__ == "__main__": 14 | main() 15 | -------------------------------------------------------------------------------- /December-09/python_sartsha.py: -------------------------------------------------------------------------------- 1 | import validators 2 | def IsURL(url): 3 | if (validators.url(url) == True): 4 | return True 5 | else: 6 | return False 7 | print(IsURL(input('Enter URL :'))) 8 | -------------------------------------------------------------------------------- /December-09/python_shrufire.py: -------------------------------------------------------------------------------- 1 | import re 2 | def IsURL(str1): 3 | p = re.search('^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$', str1) 4 | if p: 5 | print('True') 6 | else: 7 | print('False') 8 | 9 | str1 = input('Enter the URL: ') 10 | IsURL(str1) 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /December-09/python_surudhi.py: -------------------------------------------------------------------------------- 1 | import re 2 | def IsURL(str1): 3 | p = re.search('^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$', str1) 4 | if p: 5 | print('True') 6 | else: 7 | print('False') 8 | 9 | str1 = input('Enter the URL: ') 10 | IsURL(str1) 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /December-10/go_arjunAravind.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "bufio" 7 | "strconv" 8 | ) 9 | 10 | func GetNum() int { 11 | fmt.Printf("Enter a number --> ") 12 | 13 | scanner := bufio.NewScanner(os.Stdin) 14 | _ = scanner.Scan() 15 | 16 | enteredText := scanner.Text() 17 | enteredNumber, err := strconv.Atoi(enteredText) 18 | 19 | if err != nil { 20 | fmt.Printf("Oops! You seem to have entered a wrong value! Try again!\n\n") 21 | return GetNum() 22 | } 23 | 24 | return enteredNumber 25 | } 26 | 27 | func main() { 28 | 29 | a := GetNum() 30 | b := GetNum() 31 | c := GetNum() 32 | d := GetNum() 33 | 34 | fmt.Printf("The determinant is --> %v\n", (a*d)-(b*c)) 35 | 36 | } 37 | -------------------------------------------------------------------------------- /December-10/py_10 AJShalini21.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # In[ ]: 5 | 6 | 7 | import numpy 8 | n= int (input("enter number of rows and columns")) 9 | a=[] 10 | for i in range(n): 11 | for j in range(n): 12 | b=int (input("enter the element")) 13 | a.append(b) 14 | 15 | a=numpy.array(a).reshape(n,n) 16 | print(a) 17 | d= numpy.linalg.det(a) 18 | print(d) 19 | 20 | -------------------------------------------------------------------------------- /December-10/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | def determinant(m1): 3 | print (numpy.linalg.det(m1)) 4 | 5 | r1 = int(input('Enter number of rows of m1')) 6 | c1 = int(input('Enter number of coloumns of m1')) 7 | 8 | if c1 != r1: 9 | print('Determinant not possible to find') 10 | exit() 11 | else: 12 | m1 = [ [0 for i in range(0,c1)] for j in range(0,r1)] 13 | print('Enter matrix 1') 14 | for i in range(0,r1): 15 | for j in range(0,c1): 16 | m1[i][j] = int(input('Enter element')) 17 | determinant(m1) -------------------------------------------------------------------------------- /December-10/py_anuppriya_determinant.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | m=int(input("Enter the no of rows:")) 4 | n=int(input("Enter the no of columns:")) 5 | 6 | mat=[] 7 | for i in range(0,n): 8 | mat.append([]) 9 | for i in range(0,m): 10 | for j in range(0,n): 11 | mat[i].append(j) 12 | mat[i][j]=0 13 | for i in range(0,m): 14 | for j in range(0,n): 15 | mat[i][j]=int(input()) 16 | print(mat) 17 | 18 | print(np.linalg.det(mat)) 19 | -------------------------------------------------------------------------------- /December-10/py_imhphari.py: -------------------------------------------------------------------------------- 1 | def det(l): 2 | n=len(l) 3 | if (n>2): 4 | i=1 5 | t=0 6 | sum=0 7 | while t<=n-1: 8 | d={} 9 | t1=1 10 | while t1<=n-1: 11 | m=0 12 | d[t1]=[] 13 | while m<=n-1: 14 | if (m==t): 15 | u=0 16 | else: 17 | d[t1].append(l[t1][m]) 18 | m+=1 19 | t1+=1 20 | l1=[d[x] for x in d] 21 | sum=sum+i*(l[0][t])*(det(l1)) 22 | i=i*(-1) 23 | t+=1 24 | return sum 25 | else: 26 | return (l[0][0]*l[1][1]-l[0][1]*l[1][0]) 27 | -------------------------------------------------------------------------------- /December-10/python_AkshayaRC.py: -------------------------------------------------------------------------------- 1 | import sys 2 | n=int(input("enter order of matrix (n*n)")) 3 | if not(n==3 or n==2): 4 | print("Enter order 2 or 3") 5 | sys.exit() 6 | a=[[0]*n for i in range(n)] 7 | print("enter matrix elements") 8 | for i in range(0,n): 9 | for j in range(0,n): 10 | a[i][j]=int(input()) 11 | if n==2: 12 | det=(a[0][0]*a[1][1])-(a[0][1]*a[1][0]) 13 | elif n==3: 14 | det=(a[0][0]*((a[1][1]*a[2][2])-(a[1][2]*a[2][1])))-(a[0][1]*((a[1][0]*a[2][2])-(a[2][0]*a[1][2])))+(a[0][2]*((a[1][0]*a[2][1])-(a[2][0]*a[1][1]))) 15 | print("determinant: ",det) 16 | -------------------------------------------------------------------------------- /December-10/python_MaddyDinesh_determinant.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | n=int(input("enter the no of rows")) 3 | m=int(input("enter the no of colums")) 4 | a=[[0]*n for i in range(0,n)] 5 | for i in range(n): 6 | for j in range(m): 7 | a[i][j]=int(input()) 8 | det = numpy.linalg.det(a) 9 | print(round(det)) -------------------------------------------------------------------------------- /December-10/python_Raahul46_determinant.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | """ 4 | Hi there. 5 | This file doesn't contain any code. 6 | It's just here to give an example of the file naming scheme. 7 | Cheers! 8 | """ 9 | import numpy.linalg as m 10 | import numpy as np 11 | 12 | def deter(mat): 13 | matrix1 =np.matrix(mat) 14 | print("THE ORGINAL MATRIX \n",matrix1) 15 | print("THE DETERMINANT \n",m.det(matrix1)) 16 | 17 | def main(): 18 | n = int(input("Enter the number of rows in a matrix")) 19 | a = [[0 for x in range(n)] for y in range(n)] 20 | for i in range(n): 21 | for j in range(n): 22 | a[i][j] = int(input()) 23 | deter(a) 24 | if __name__ == '__main__': 25 | main() 26 | -------------------------------------------------------------------------------- /December-10/python_aashish2000_Determinant.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | n=int(input("Matrix Size:")) 4 | print("Input Array(X):") 5 | mat=[] 6 | for i in range(n): 7 | row=list(map(int,input().split())) 8 | mat.append(row) 9 | 10 | print("determinant(X):") 11 | a=np.array(mat) 12 | print(np.linalg.det(a)) 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /December-10/python_dec10_Sushmakarunakaran.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | n= int (input("enter number of rows and columns")) 3 | a=[] 4 | for i in range(n): 5 | for j in range(n): 6 | b=int (input("enter the element")) 7 | a.append(b) 8 | 9 | a=numpy.array(a).reshape(n,n) 10 | print(a) 11 | d= numpy.linalg.det(a) 12 | print(d) 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /December-10/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 10 2 | import numpy as np 3 | 4 | l = [] 5 | n = int(input("Enter number of rows: ")) 6 | print("Enter the matrix row-wise with spaces") 7 | while n > 0: 8 | l.append(list(map(int, input().split()))) 9 | n -= 1 10 | print(f"Determinant={np.linalg.det(l).round()}") 11 | 12 | # Sample Input 13 | # Enter number of rows: 3 14 | # Enter the matrix row-wise with spaces 15 | # 4 9 2 16 | # 3 5 7 17 | # 8 1 6 18 | # Determinant=360.0 19 | -------------------------------------------------------------------------------- /December-10/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-10/python_harshith_FIND_THE_DETERMINANT.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | n=int(input("enter")) 3 | a=[[0]*n for i in range(0,n)] 4 | for i in range(n): 5 | for j in range(n): 6 | a[i][j]=int(input("enter")) 7 | z=np.linalg.det(a) 8 | print(int(round(z))) 9 | -------------------------------------------------------------------------------- /December-10/python_nivethitharajendran_10determinant.py.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | n=int(input("enter the no of rows")) 3 | m=int(input("enter the no of colums")) 4 | a=[[0]*n for i in range(0,n)] 5 | for i in range(n): 6 | for j in range(m): 7 | a[i][j]=int(input()) 8 | det = numpy.linalg.det(a) 9 | print("The determinant of the matrix is:",round(det)) 10 | -------------------------------------------------------------------------------- /December-10/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | n=int(input("enter the no of rows")) 3 | m=int(input("enter the no of colums")) 4 | a=[[0]*n for i in range(0,n)] 5 | for i in range(n): 6 | for j in range(m): 7 | a[i][j]=int(input()) 8 | det = numpy.linalg.det(a) 9 | print(round(det)) 10 | -------------------------------------------------------------------------------- /December-10/python_sartsha.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | n = int(input('Enter order of matrix :')) 3 | mat = [[0 for _ in range(n)] for i in range(n)] 4 | det = np.linalg.det(mat) 5 | print("Determinant =",det) 6 | -------------------------------------------------------------------------------- /December-11/py_imhphari.py: -------------------------------------------------------------------------------- 1 | def spiral(m,n,a) : 2 | k=0 3 | l=0 4 | 5 | while (k < m and l < n): 6 | for i in range(l,n): 7 | print(a[k][i],end = " ") 8 | k+=1 9 | 10 | for i in range(k,m): 11 | print(a[i][n-1],end=" ") 12 | 13 | n -=1 14 | 15 | if ( k < m) : 16 | for i in range(n-1,(l-1),-1) : 17 | print(a[m - 1][i],end=" ") 18 | 19 | m-=1 20 | 21 | if(l",end="") 7 | k=k+1 8 | 9 | for i in range(k,m): 10 | print(e[i][n-1],"-->",end="") 11 | n=n-1 12 | 13 | if k",end="") 16 | m=m-1 17 | if l",end="") 20 | l=l+1 21 | 22 | m =3 23 | n=3 24 | a = [ [1, 2, 3], 25 | [4, 5, 6], 26 | [7, 8, 9] ] 27 | spiral(m,n,a) 28 | 29 | -------------------------------------------------------------------------------- /December-11/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-11/python_nivethitharajendran_11spiral.py.py: -------------------------------------------------------------------------------- 1 | def spiral(m,n,e): 2 | k=0 3 | l=0 4 | while k",end="") 7 | k=k+1 8 | 9 | for i in range(k,m): 10 | print(e[i][n-1],"-->",end="") 11 | n=n-1 12 | 13 | if k",end="") 16 | m=m-1 17 | if l",end="") 20 | l=l+1 21 | 22 | m =3 23 | n=3 24 | a = [ [1, 2, 3], 25 | [4, 5, 6], 26 | [7, 8, 9] ] 27 | spiral(m,n,a) 28 | 29 | -------------------------------------------------------------------------------- /December-12/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 12 2 | s = input("Enter the numbers with ->: ").split('->') 3 | # Linked list is actually a list in python (No pointer concept in python) 4 | s = [int(x) for x in s] 5 | s.sort(reverse=True) 6 | fin = "" 7 | for x in s: 8 | fin = fin + f"{x} -> " 9 | print(fin[:-3]) 10 | 11 | # Sample I/O 12 | # Enter the numbers with ->: 10 -> 20 -> 34 -> 23 -> 889 13 | # 889 -> 34 -> 23 -> 20 -> 10 14 | -------------------------------------------------------------------------------- /December-12/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-13/c_RohitMidha23.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | 6 | void swap(char *x, char *y) 7 | { 8 | char temp; 9 | temp = *x; 10 | *x = *y; 11 | *y = temp; 12 | } 13 | 14 | void permute(char *a, int l, int r) 15 | { 16 | int i; 17 | if (l == r) 18 | printf("%s\n", a); 19 | else 20 | { 21 | for (i = l; i <= r; i++) 22 | { 23 | swap((a+l), (a+i)); 24 | permute(a, l+1, r); 25 | swap((a+l), (a+i)); //backtrack 26 | } 27 | } 28 | } 29 | 30 | int main() 31 | { 32 | char str[100]; 33 | printf("Enter String : "); scanf("%s",str); 34 | int n = strlen(str); 35 | permute(str, 0, n-1); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /December-13/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | def lex(li,s): 3 | li = list(itertools.permutations(li)) 4 | li = [ ''.join(combos) for combos in li] 5 | li.sort() 6 | print(li) 7 | for i in range(len(li)): 8 | if li[i]==s: 9 | print(str(i+1)+' Position') 10 | 11 | s = input('Enter input') 12 | lex(list(s),s) -------------------------------------------------------------------------------- /December-13/py_imhphari.py: -------------------------------------------------------------------------------- 1 | def fact(n): 2 | f=1 3 | while n>=1: 4 | f=f*n 5 | n=n-1 6 | return f 7 | 8 | def sm(st,low,high) : 9 | 10 | countRight=0 11 | i=low+1 12 | while i<=high : 13 | if st[i]= l: 3 | mid = l + (r - l)//2 4 | if arr[mid] == x: 5 | return mid 6 | elif arr[mid] > x: 7 | return binarySearch(arr, l, mid-1, x) 8 | else: 9 | return binarySearch(arr, mid + 1, r, x) 10 | else: 11 | return -1 12 | 13 | from itertools import permutations 14 | s=str(input()) 15 | all_perm=[] 16 | for string in permutations(s): 17 | if((''.join(string)) not in all_perm): 18 | all_perm.append(''.join(string)) 19 | all_perm.sort() 20 | index=binarySearch(all_perm, 0, len(all_perm)-1, s) 21 | print (index+1) 22 | -------------------------------------------------------------------------------- /December-13/python_crytotech.py: -------------------------------------------------------------------------------- 1 | lst=[] 2 | def permute(s,i,n): 3 | if i==n: 4 | lst.append(''.join(s)) 5 | else: 6 | for j in range(i,len(s)): 7 | s[i],s[j]=s[j],s[i] 8 | permute(s,i+1,n) 9 | s[i],s[j]=s[j],s[i] 10 | def main(): 11 | st=input("Input:") 12 | a=list(st) 13 | print("Posible combinations:") 14 | permute(a,0,len(st)-1) 15 | lst.sort() 16 | #print(lst) 17 | print('\n'.join(lst)) 18 | for i in lst: 19 | if i==st: 20 | print("Match at position",lst.index(i)+1) 21 | main() 22 | -------------------------------------------------------------------------------- /December-13/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 13 2 | from itertools import permutations 3 | s = input("Enter string: ") 4 | fin = list(set(permutations(list(s)))) 5 | fin.sort() 6 | print('The order') 7 | for ind, letters in enumerate(fin): 8 | word = ''.join(x for x in letters) 9 | if word == s: 10 | print(f"{word} --> Match found at position {ind+1}") 11 | else: 12 | print(word) 13 | 14 | # Sample I/O 15 | # Enter string: dac 16 | # The order 17 | # acd 18 | # adc 19 | # cad 20 | # cda 21 | # dac --> Match found at position 5 22 | # dca 23 | -------------------------------------------------------------------------------- /December-13/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-13/python_harshith_Lexicographical Arrangement.py: -------------------------------------------------------------------------------- 1 | from itertools import permutations 2 | a=[] 3 | def allPermutations(str): 4 | permList = permutations(str) 5 | for perm in list(permList): 6 | a.append(''.join(perm)) 7 | 8 | x=input("Enter the word") 9 | allPermutations(x) 10 | z=1 11 | a.sort() 12 | for i in a: 13 | if i==x: 14 | print(z) 15 | else: 16 | z=z+1 17 | -------------------------------------------------------------------------------- /December-13/python_kumaran_lexicographical.py: -------------------------------------------------------------------------------- 1 | from itertools import permutations 2 | a=[] 3 | def allPermutations(str): 4 | permList = permutations(str) 5 | for perm in list(permList): 6 | a.append(''.join(perm)) 7 | 8 | x=input("Enter the word") 9 | allPermutations(x) 10 | z=1 11 | a.sort() 12 | for i in a: 13 | if i==x: 14 | print(z) 15 | else: 16 | z=z+1 17 | -------------------------------------------------------------------------------- /December-13/python_nivethitharajendran_13lexicographical.py.py: -------------------------------------------------------------------------------- 1 | from itertools import permutations 2 | a=[] 3 | def allPermutations(str): 4 | permList = permutations(str) 5 | for perm in list(permList): 6 | a.append(''.join(perm)) 7 | 8 | x=input("Enter the word") 9 | allPermutations(x) 10 | z=1 11 | a.sort() 12 | for i in a: 13 | if i==x: 14 | print(z) 15 | else: 16 | z=z+1 17 | -------------------------------------------------------------------------------- /December-13/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | rom itertools import permutations 2 | a=[] 3 | def allPermutations(str): 4 | permList = permutations(str) 5 | for perm in list(permList): 6 | a.append(''.join(perm)) 7 | 8 | x=input("Enter the word") 9 | allPermutations(x) 10 | z=1 11 | a.sort() 12 | for i in a: 13 | if i==x: 14 | print(z) 15 | else: 16 | z=z+1 17 | -------------------------------------------------------------------------------- /December-13/python_raf1800.py: -------------------------------------------------------------------------------- 1 | from itertools import permutations 2 | def LexiArr(x) : 3 | letters = x 4 | perm = permutations(letters) 5 | poss = list(perm) 6 | poss.sort() 7 | j=1 8 | for i in poss: 9 | word=''.join(i) 10 | if(word==x): 11 | print (word + " ----> Match found here at position {}".format(j)) 12 | else: 13 | print(word) 14 | j+=1 15 | 16 | def main(): 17 | x=input("Enter a word: ") 18 | LexiArr(x) 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /December-13/python_sartsha.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | s = input('Input :') 3 | permu = list(itertools.permutations(s,len(s))) 4 | permu = [ ''.join(combos) for combos in permu] 5 | permu.sort() 6 | for i in range(len(permu)): 7 | if permu[i]==s: 8 | print(permu[i]+" --> Match Found at Position "+str(i+1)) 9 | else: 10 | print(permu[i]) 11 | -------------------------------------------------------------------------------- /December-13/python_shrufire.py: -------------------------------------------------------------------------------- 1 | from itertools import permutations 2 | S=input('Enter the word ') 3 | print('Possible Combinations: ') 4 | print('\n'.join(sorted(''.join(p) for p in permutations(S,len(S))))) 5 | t=sorted(''.join(p) for p in permutations(S,len(S))) 6 | k=t.index(S) 7 | print('Position of',S,'is',k+1) 8 | -------------------------------------------------------------------------------- /December-13/python_surudhi.py: -------------------------------------------------------------------------------- 1 | from itertools import permutations 2 | S=input('Enter the word ') 3 | print('Possible Combinations: ') 4 | print('\n'.join(sorted(''.join(p) for p in permutations(S,len(S))))) 5 | t=sorted(''.join(p) for p in permutations(S,len(S))) 6 | k=t.index(S) 7 | print('Position of',S,'is',k+1) 8 | -------------------------------------------------------------------------------- /December-14/C_14 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int key,i=0,j; 5 | char arr[20],caes[20]; 6 | printf("Plaintext: "); 7 | gets(arr); 8 | printf("Enter the key: "); 9 | scanf("%d",&key); 10 | j=(i+key)%26; 11 | while(arr[i]!='\0') 12 | { 13 | if(arr[i]==' ') 14 | caes[i]=arr[i]; 15 | else 16 | caes[i]=arr[i]+j; 17 | i++; 18 | } 19 | caes[i]='\0'; 20 | printf("\nEncoded Output = "); 21 | puts(caes); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /December-14/c_Nilesh2000.c: -------------------------------------------------------------------------------- 1 | # include 2 | void encryptKey(char [], int); 3 | void decryptKey(char [], int); 4 | int main(void) 5 | { 6 | char Text[10]; 7 | int Key; 8 | printf("\nInput: "); 9 | scanf("%s %d", Text, &Key); 10 | encryptKey(Text, Key); 11 | return 0; 12 | } 13 | void encryptKey(char Input[10], int k) 14 | { 15 | int i; 16 | for(i=0;Input[i]!='\0';i++) 17 | { 18 | Input[i]+=k; 19 | } 20 | Input[i]='\0'; 21 | printf("Encoded output: %s\n", Input); 22 | } 23 | void decryptKey(char Input[10], int k) 24 | { 25 | int i; 26 | for(i=0;Input[i]!='\0';i++) 27 | { 28 | Input[i]-=k; 29 | } 30 | Input[i]='\0'; 31 | printf("Decoded output: %s\n", Input); 32 | } 33 | -------------------------------------------------------------------------------- /December-14/c_Sushmakarunakaran.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | int main() 5 | { 6 | char p[20]; 7 | int key,i,enc; 8 | 9 | printf("Enter Plain text="); 10 | gets(p); 11 | printf("\n Enter Key="); 12 | scanf("%d",&key); 13 | key=key%26; 14 | 15 | for(i=0;i {0}.\n",Cipher.Caesarize(word, val)); 25 | Console.ReadKey(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /December-14/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | import string 2 | def caesaren(s,a): 3 | li = [] 4 | for char in s: 5 | x = ord(char) 6 | x = x + a 7 | char = chr(x) 8 | li.append(char) 9 | li =''.join(li) 10 | print(li) 11 | return li,a 12 | def caesarde(s,a): 13 | li = [] 14 | for char in s: 15 | x = ord(char) 16 | x = x - a 17 | char = chr(x) 18 | li.append(char) 19 | li =''.join(li) 20 | print(li) 21 | print('Encryption') 22 | li,a =caesaren(list(input('Enter String')),int(input('Enter number'))) 23 | print('decryption') 24 | caesarde(list(li),a) -------------------------------------------------------------------------------- /December-14/py_anuppriya_caesarcipher.py: -------------------------------------------------------------------------------- 1 | def encrypt(): 2 | string = input("Enter string: ") 3 | shift = int(input("Enter shift number: ")) 4 | print("Original string: ", string) 5 | cipher = '' 6 | for char in string: 7 | if char == ' ': 8 | cipher = cipher + char 9 | elif char.isupper(): 10 | cipher = cipher + chr((ord(char) + shift - 65) % 26 + 65) 11 | else: 12 | cipher = cipher + chr((ord(char) + shift - 97) % 26 + 97) 13 | 14 | print("After encryption: ",cipher) 15 | encrypt() 16 | -------------------------------------------------------------------------------- /December-14/py_imhphari.py: -------------------------------------------------------------------------------- 1 | def encrypt(text,s): 2 | result = "" 3 | 4 | for i in range(len(text)): 5 | char = text[i] 6 | 7 | if (char.isupper()): 8 | result+=chr((ord(char)+s-65)%26+65) 9 | else: 10 | result+=chr((ord(char)+s-97)%26+97) 11 | 12 | return result 13 | 14 | text = input("Enter string:") 15 | s = 3 16 | print ("Input: " + text) 17 | #print ("Shift : " + str(s)) 18 | print ("Encoded output: " + encrypt(text,s) ) 19 | -------------------------------------------------------------------------------- /December-14/python_AkshayaRC.py: -------------------------------------------------------------------------------- 1 | def crypt(text,key,ans): 2 | c="" 3 | for i in text: 4 | x=ord(i) 5 | if ans.lower()=="encrypt": 6 | x=x+key 7 | elif ans.lower()=="decrypt": 8 | x=x-key 9 | c+=chr(x) 10 | print("Output:",c) 11 | 12 | text=input("Text:") 13 | key=int(input("Key (0-25):")) 14 | ans=input("Encrypt/Decrypt?") 15 | crypt(text,key,ans) 16 | 17 | -------------------------------------------------------------------------------- /December-14/python_RohitMidha23.py: -------------------------------------------------------------------------------- 1 | def caesar_cipher(c,s): 2 | result = "" 3 | for i in range(len(c)): 4 | char = c[i] 5 | if (char.isupper()): 6 | # A is 65, a is 97. 7 | result += chr((ord(char) + s-65) % 26 + 65) 8 | else: 9 | result += chr((ord(char) + s - 97) % 26 + 97) 10 | 11 | return result 12 | 13 | 14 | c = input("Enter String to Encrypt : ") 15 | 16 | s = int(input("Enter Cipher Value: ")) 17 | 18 | print ("Cipher: " + caesar_cipher(c,s)) 19 | -------------------------------------------------------------------------------- /December-14/python_aashish2000_caeCipher.py: -------------------------------------------------------------------------------- 1 | def encrypt(text,s): 2 | result = "" 3 | 4 | # traverse text 5 | for i in range(len(text)): 6 | char = text[i] 7 | 8 | # Encrypt uppercase characters 9 | if (char.isupper()): 10 | result += chr((ord(char) + s-65) % 26 + 65) 11 | 12 | # Encrypt lowercase characters 13 | else: 14 | result += chr((ord(char) + s - 97) % 26 + 97) 15 | 16 | return result 17 | 18 | allval=list(map(str, input("Input: ").split())) 19 | ans=encrypt(allval[0], int(allval[1])) 20 | print("Encoded Output:",ans) 21 | -------------------------------------------------------------------------------- /December-14/python_crytotech.py: -------------------------------------------------------------------------------- 1 | def crypt(text,key,ans): 2 | c="" 3 | for i in text: 4 | x=ord(i) 5 | if ans.lower()=="encrypt": 6 | x=x+key 7 | elif ans.lower()=="decrypt": 8 | x=x-key 9 | c+=chr(x) 10 | print("Output:",c) 11 | 12 | text=input("Text:") 13 | key=int(input("Key (0-25):")) 14 | ans=input("Encrypt/Decrypt?") 15 | crypt(text,key,ans) 16 | -------------------------------------------------------------------------------- /December-14/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 14 2 | st, num = input('Input: ').split() 3 | st = list(st) 4 | num = int(num) 5 | for i in range(len(st)): 6 | st[i] = chr(ord(st[i]) + num) 7 | encrypted = ''.join(x for x in st) 8 | print('Encoded output:', encrypted) 9 | 10 | # Decryption (Optional) 11 | # def decrypt(s,num): 12 | # s = list(s) 13 | # for i in range(len(s)): 14 | # st[i] = chr(ord(st[i]) - num) 15 | # print('Decrypted:',''.join(x for x in st)) 16 | 17 | # decrypt(encrypted,num) 18 | 19 | # Sample I/O 20 | # Input: feel 4 21 | # Encoded output: jiip 22 | -------------------------------------------------------------------------------- /December-14/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-14/python_harshith_Caesar_Cipher.py: -------------------------------------------------------------------------------- 1 | x=input("Enter the input string") 2 | y=int(input("Enter the number")) 3 | for i in x: 4 | print(chr(ord(i)+y),end=""), 5 | -------------------------------------------------------------------------------- /December-14/python_kumaran_caesar.py: -------------------------------------------------------------------------------- 1 | x=input("Enter the input string") 2 | y=int(input("Enter the number")) 3 | for i in x: 4 | print(chr(ord(i)+y),end="") 5 | -------------------------------------------------------------------------------- /December-14/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | def encrypt(string, shift): 2 | 3 | cipher = ' ' 4 | for char in string: 5 | if char == ' ': 6 | cipher = cipher + char 7 | elif char.isupper(): 8 | cipher = cipher + chr((ord(char) + shift - 65) % 26 + 65) 9 | else: 10 | cipher = cipher + chr((ord(char) + shift - 97) % 26 + 97) 11 | 12 | return cipher 13 | 14 | text = input("enter string: ") 15 | s = int(input("enter shift number: ")) 16 | print("original string: ", text) 17 | print("after encryption: ", encrypt(text, s)) 18 | -------------------------------------------------------------------------------- /December-14/python_raf1800.py: -------------------------------------------------------------------------------- 1 | def CC(word,gap) : 2 | result=list() 3 | count=1 4 | i=0 5 | while(count<=len(word)): 6 | if(word[i].isupper()): 7 | result.append(chr((ord(word[i])+gap-65)%26+65)) 8 | else: 9 | result.append(chr((ord(word[i])+gap-97)%26+97)) 10 | count+=1 11 | i+=1 12 | print (''.join(result)) 13 | 14 | def main(): 15 | x=input("Enter a word: ") 16 | gap = int(input("Enter a number: ")) 17 | CC(x,gap); 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /December-14/python_sartsha.py: -------------------------------------------------------------------------------- 1 | s=input("Input: ").split() 2 | 3 | word=s[0] 4 | k = int(s[1]) 5 | print('Encoded output:',end = '') 6 | for char in word: 7 | p = ord(char)+k 8 | if(p>122): 9 | p-=26 10 | print(chr(p),end='') 11 | -------------------------------------------------------------------------------- /December-14/python_shrufire.py: -------------------------------------------------------------------------------- 1 | x1=input('Input:') 2 | str=[] 3 | for i in range(len(x1)-2): 4 | char=x1[i] 5 | ch=chr(ord(char)+int(x1[-1])) 6 | str.append(ch) 7 | x=''.join(str) 8 | print('Encoded Output:',x) 9 | 10 | 11 | -------------------------------------------------------------------------------- /December-14/python_surudhi.py: -------------------------------------------------------------------------------- 1 | x1=input('Input:') 2 | str=[] 3 | for i in range(len(x1)-2): 4 | char=x1[i] 5 | ch=chr(ord(char)+int(x1[-1])) 6 | str.append(ch) 7 | x=''.join(str) 8 | print('Encoded Output:',x) 9 | 10 | 11 | -------------------------------------------------------------------------------- /December-15/C++_Nilesh2000.cpp: -------------------------------------------------------------------------------- 1 | # include 2 | using namespace std; 3 | void printPascal(int r) 4 | { 5 | int Arr[r][r]; 6 | cout <<"\n"; 7 | for(int Line=0;Line Row " <>Rows; 28 | printPascal(Rows+1); 29 | } 30 | -------------------------------------------------------------------------------- /December-15/C_15 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | void pascal(int); 3 | int a[20][20]; 4 | int main() 5 | { 6 | int i,j,n; 7 | printf("Enter the no. of rows "); 8 | scanf("%d",&n); 9 | pascal(n+1); 10 | return 0; 11 | } 12 | void pascal(int n) 13 | { 14 | int i; 15 | if(n==1) 16 | { 17 | a[0][0]=1; 18 | printf("\nrow 0 --> 1"); 19 | return; 20 | } 21 | else 22 | { 23 | pascal(n-1); 24 | a[n-1][0]=1; 25 | printf("\nrow %d --> %d\t",n-1,a[n-1][0]); 26 | for(i=1;i=1 8 | 9 | n = int(input("Enter number of rows : ")) 10 | pascal_triangle(n) -------------------------------------------------------------------------------- /December-15/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-15/python_harshith_Pascal's_Triangle.py: -------------------------------------------------------------------------------- 1 | x=int(input("Enter the number")) 2 | a=[1] 3 | b=[1,1] 4 | c=0 5 | while c row',i,'\n') 15 | 16 | n = int(input('Enter number of rows :')) 17 | pascal(n) 18 | -------------------------------------------------------------------------------- /December-16/py_16 AJShalini21.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # In[ ]: 5 | 6 | 7 | import requests 8 | api_address ='http://api.openweathermap.org/data/2.5/weather?appid=71ebadb9a97ad010c0248b72657635c5&q=' 9 | city1=input("enter city1 name :") 10 | city2=input("enter city2 name :") 11 | url1 = api_address + city1 12 | url2 = api_address + city2 13 | json_data1= requests.get(url1).json() 14 | json_data2= requests.get(url2).json() 15 | data1=json_data1['main']['temp'] 16 | data2=json_data2['main']['temp'] 17 | print("the difference in temperature is") 18 | print(data1-data2) 19 | 20 | -------------------------------------------------------------------------------- /December-16/py_anuppriya_tempdifference.py: -------------------------------------------------------------------------------- 1 | import json 2 | import requests 3 | import datetime 4 | now=datetime.datetime.now() 5 | res1=requests.get("http://api.openweathermap.org/data/2.5/weather?id=1264527&units=metric&APPID=11111121111a") 6 | data1=res1.json() 7 | temp1=(data1["main"]["temp"]) 8 | res2=requests.get("http://api.openweathermap.org/data/2.5/weather?id=2643743&units=metric&APPID=11111121111a") 9 | data2=res2.json() 10 | temp2=(data2["main"]["temp"]) 11 | print("Taken at ",now.strftime("%H:%M"),"(IST),",now.strftime("%d-%m-%y")) 12 | print("Current temperature difference between Chennai,TN and London,GB is ",temp1-temp2,"\u00b0C") 13 | 14 | -------------------------------------------------------------------------------- /December-16/python_AkshayaRC.py: -------------------------------------------------------------------------------- 1 | import json 2 | import requests 3 | import datetime 4 | now=datetime.datetime.now() 5 | res1=requests.get("http://api.openweathermap.org/data/2.5/weather?id=1264527&units=metric&APPID=11111121111a") 6 | data1=res1.json() 7 | temp1=(data1["main"]["temp"]) 8 | res2=requests.get("http://api.openweathermap.org/data/2.5/weather?id=2643743&units=metric&APPID=11111121111a") 9 | data2=res2.json() 10 | temp2=(data2["main"]["temp"]) 11 | print("Taken at ",now.strftime("%H:%M"),"(IST),",now.strftime("%d-%m-%y")) 12 | print("Current temperature difference between Chennai,TN and London,GB is ",temp1-temp2,"\u00b0C") 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /December-16/python_Nilesh2000.py: -------------------------------------------------------------------------------- 1 | import requests 2 | api_address ='http://api.openweathermap.org/data/2.5/weather?appid=71ebadb9a97ad010c0248b72657635c5&q=' 3 | city1=input("enter city1 name :") 4 | city2=input("enter city2 name :") 5 | url1 = api_address + city1 6 | url2 = api_address + city2 7 | json_data1= requests.get(url1).json() 8 | json_data2= requests.get(url2).json() 9 | data1=json_data1['main']['temp'] 10 | data2=json_data2['main']['temp'] 11 | print("the difference in temperature is") 12 | print(data1-data2) 13 | -------------------------------------------------------------------------------- /December-16/python_RohitMidha23.py: -------------------------------------------------------------------------------- 1 | import pyowm 2 | 3 | # Creating owm with my API Key 4 | owm = pyowm.OWM('my-api-key-here') 5 | 6 | city1 = input("Enter city 1: ") 7 | city2 = input("Enter city 2: ") 8 | 9 | w1 = owm.weather_at_place(city1) 10 | w2 = owm.weather_at_place(city2) 11 | 12 | weather_difference = w1.get_temperature('celsius')-w2.get_temperature('celsius') 13 | 14 | print(weather_difference) -------------------------------------------------------------------------------- /December-16/python_Sushmakarunakaran.py: -------------------------------------------------------------------------------- 1 | import requests 2 | api_address ='http://api.openweathermap.org/data/2.5/weather?appid=71ebadb9a97ad010c0248b72657635c5&q=' 3 | city1=input("enter city1 name :") 4 | city2=input("enter city2 name :") 5 | url1 = api_address + city1 6 | url2 = api_address + city2 7 | json_data1= requests.get(url1).json() 8 | json_data2= requests.get(url2).json() 9 | data1=json_data1['main']['temp'] 10 | data2=json_data2['main']['temp'] 11 | print("the difference in temperature is") 12 | print(data1-data2) 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /December-16/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-16/python_sartsha.py: -------------------------------------------------------------------------------- 1 | import requests,json 2 | def getKey(): 3 | with open('key.txt') as f: 4 | for line in f: 5 | return(line) 6 | api_key = getKey() 7 | url = "http://api.openweathermap.org/data/2.5/weather?appid="+api_key+"&q=" 8 | city1 = input('Enter name of first city: ') 9 | city2 = input('Enter name of second city: ') 10 | url1 = url+city1 11 | url2 = url+city2 12 | resp1 = requests.get(url1).json() 13 | resp2 = requests.get(url2).json() 14 | try: 15 | temp1 = resp1['main']['temp'] 16 | temp2 = resp2['main']['temp'] 17 | print('Current Temperature difference between '+city1+' and '+city2+' is '+str(temp1-temp2)+'°C') 18 | except: 19 | print('Error! City not found') 20 | -------------------------------------------------------------------------------- /December-17/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-18/py_18 AJShalini21.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # In[ ]: 5 | 6 | 7 | import pandas as pd 8 | import time 9 | data=pd.read_excel("PASSWORD.xlsx") 10 | a=input("enter the password") 11 | b=time.time() 12 | c=data[data.password==a] 13 | d=time.time() 14 | print (d) 15 | 16 | -------------------------------------------------------------------------------- /December-18/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | import string 2 | import itertools 3 | import time 4 | def bruteforce(s): 5 | print(s) 6 | print(len(s)) 7 | l2 = [] 8 | l1 = list(itertools.permutations(range(32,127),len(s))) 9 | #print(str(l1)) 10 | t0 = time.time() 11 | for tuples in l1: 12 | tuples = list(tuples) 13 | for nums in range(len(tuples)): 14 | tuples[nums] = str(chr(tuples[nums])) 15 | tuples = ''.join(tuples) 16 | if s==tuples: 17 | print('Match found in ' +str(time.time()-t0)) 18 | exit() 19 | #t0 = time.perf_counter() 20 | #for password in l2: 21 | # if s==password: 22 | # print('Match found in ' +str(time.time()-t0)) 23 | # exit() 24 | 25 | bruteforce(input('Enter password minimum of 3 letters and maximum of 30')) -------------------------------------------------------------------------------- /December-18/py_anuppriya_pwsecured.py: -------------------------------------------------------------------------------- 1 | import re 2 | import time 3 | import itertools 4 | file=open("Dec18-1000_most_common_passwords.txt","r") 5 | pwd=input("enter password: ") 6 | flag=0 7 | start=time.time() 8 | for i in file: 9 | z=re.search(pwd,i) 10 | if z: 11 | end=time.time() 12 | tt=end-start 13 | flag=1 14 | break 15 | if flag==0: 16 | ch=[] 17 | for i in range(32,127): 18 | ch.append(chr(i)) 19 | ##print(ch) 20 | for i in range(1,9): 21 | for j in itertools.product(ch,repeat=i): 22 | j=''.join(j) 23 | if j == pwd: 24 | end = time.time() 25 | tt=end-start 26 | print("Time taken to bruteforce:",tt,"s") 27 | -------------------------------------------------------------------------------- /December-18/py_imhphari.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | file = open('dict.txt', 'r') 4 | pas=input("Enter password:") 5 | """pas=r'^(pas)$'""" 6 | pas= r"\b(?=\w)" + re.escape(pas) + r"\b(?!\w)" 7 | 8 | from datetime import datetime 9 | start_time = datetime.now() 10 | 11 | for line in file.readlines(): 12 | if re.search(pas, line, re.I): 13 | print (line) 14 | 15 | end_time = datetime.now() 16 | print('Maximum time taken to brute-force: {}'.format(end_time - start_time)+' seconds') 17 | -------------------------------------------------------------------------------- /December-18/python_AkshayaRC.py: -------------------------------------------------------------------------------- 1 | import re 2 | import time 3 | import itertools 4 | file=open("Dec18-1000_most_common_passwords.txt","r") 5 | pwd=input("enter password: ") 6 | flag=0 7 | start=time.time() 8 | for i in file: 9 | z=re.search(pwd,i) 10 | if z: 11 | end=time.time() 12 | tt=end-start 13 | flag=1 14 | break 15 | if flag==0: 16 | ch=[] 17 | for i in range(32,127): 18 | ch.append(chr(i)) 19 | ##print(ch) 20 | for i in range(1,9): 21 | for j in itertools.product(ch,repeat=i): 22 | j=''.join(j) 23 | if j == pwd: 24 | end = time.time() 25 | tt=end-start 26 | print("Time taken to bruteforce:",tt,"s") 27 | -------------------------------------------------------------------------------- /December-18/python_Sushmakarunakran.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import time 3 | data=pd.read_excel("PASSWORD.xlsx") 4 | a=input("enter the password") 5 | b=time.time() 6 | c=data[data.password==a] 7 | d=time.time() 8 | print (d) 9 | 10 | 11 | # In[ ]: 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /December-18/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-18/python_raf1800.py: -------------------------------------------------------------------------------- 1 | import random 2 | import time 3 | 4 | def Hack(pw,milli): 5 | 6 | length = len(pw) 7 | crack = "" 8 | count=0 9 | j=0 10 | while(1): 11 | for i in range(32,127): 12 | if chr(i)==pw[j]: 13 | crack+=pw[j] 14 | count+=1 15 | break 16 | j+=1 17 | if count==length and crack==pw: 18 | break 19 | print("Milliseconds required: {}".format(int(round(time.time() * 1000))-milli)) 20 | 21 | 22 | def main(): 23 | milli = int(round(time.time()*1000)) 24 | x = input("Enter password: ") 25 | Hack(x,milli); 26 | 27 | if __name__ == "__main__": 28 | main() 29 | -------------------------------------------------------------------------------- /December-19/C++_koushika.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | int hash = 7,i; 10 | char str[50]; 11 | gets(str); 12 | for (i = 0;i 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | /* Function to print reverse of the passed string */ 8 | void reverse(char *str) 9 | { 10 | if (*str) 11 | { 12 | reverse(str+1); 13 | cout<<*str; 14 | } 15 | } 16 | 17 | /* Driver program to test above function */ 18 | int main() 19 | { 20 | char a[100]; 21 | cout<<"\nEnter a string:"; 22 | gets(a); 23 | reverse(a); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /December-24/C_24 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | void reverse(char,int); 3 | char a[20]; 4 | int main() 5 | { 6 | printf("Enter String: "); 7 | gets(a); 8 | reverse(a[0],0); 9 | return 0; 10 | } 11 | void reverse(char c,int i) 12 | { 13 | if(c=='\0') 14 | return; 15 | else 16 | reverse(a[i+1],i+1); 17 | printf("%c",c); 18 | } 19 | -------------------------------------------------------------------------------- /December-24/c_Nilesh2000.c: -------------------------------------------------------------------------------- 1 | # include 2 | void reverseString(char *Str) 3 | { 4 | if(*Str) 5 | { 6 | reverseString(Str+1); 7 | printf("%c", *Str); 8 | } 9 | } 10 | int main(void) 11 | { 12 | char Str[100]; 13 | printf("\nEnter String: "); 14 | gets(Str); 15 | printf("Reversed String: "); 16 | reverseString(Str); 17 | printf("\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /December-24/c_Sushmakarunakaran.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void reverse(char *str) 4 | { 5 | if (*str) 6 | { 7 | reverse(str+1); 8 | printf("%c",*str); 9 | } 10 | } 11 | 12 | 13 | int main() 14 | { 15 | char a[10]; 16 | printf("\n enter the new string"); 17 | gets(a); 18 | reverse(a); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /December-24/harshith_python_reverse a string.py: -------------------------------------------------------------------------------- 1 | def reverse(s): 2 | if len(s) == 0: 3 | return s 4 | else: 5 | return reverse(s[1:]) + s[0] 6 | a = str(input("Enter the string to be reversed: ")) 7 | print(reverse(a)) 8 | -------------------------------------------------------------------------------- /December-24/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | def strrev(s,i,count): 2 | s[i],s[len(s)-1-i] = s[len(s)-1-i],s[i] 3 | i += 1 4 | count=count+1 5 | print(s) 6 | if count 2 | int main() 3 | { 4 | int i,j,m,n,k,l; 5 | printf("Santa's location: "); 6 | scanf("%d%d",&n,&m); 7 | printf("Child's location: "); 8 | scanf("%d%d",&l,&k); 9 | for(i=0;i<10;i++) 10 | { 11 | printf("\n"); 12 | for(j=0;j<10;j++) 13 | { 14 | if(i==m&&j==n) 15 | printf("S\t"); 16 | else if(i==k&&j==l) 17 | printf("K\t"); 18 | else if(((i==k&&(j>n&&jm&&i<=k)))&&(ml&&jk&&i<=m))) 21 | printf(" \t"); 22 | else 23 | printf("*\t"); 24 | } 25 | } 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /December-25/c_MaddyDinesh_santassselfdrivingsleigh.c.txt: -------------------------------------------------------------------------------- 1 | #include 2 | void main() 3 | { 4 | char a[12][12]; 5 | int i,j,s1,s2,c1,c2; 6 | 7 | for(i=1;i<11;i++) 8 | { 9 | for(j=1;j<11;j++) 10 | a[i][j]='*'; 11 | } 12 | printf("\nenter santa's position"); 13 | scanf("%d %d",&s1,&s2); 14 | printf("\nenter child's position"); 15 | scanf("%d %d",&c1,&c2); 16 | a[c1][c2]='c'; 17 | a[s1][s2]='s'; 18 | for(i=s2+1;i<=c2;i++) 19 | a[s1][i]=' '; 20 | for(i=s1+1;i 2 | void main() 3 | { 4 | char a[12][12]; 5 | int i,j,s1,s2,c1,c2; 6 | 7 | for(i=1;i<11;i++) 8 | { 9 | for(j=1;j<11;j++) 10 | a[i][j]='*'; 11 | } 12 | printf("\nenter santa's position"); 13 | scanf("%d %d",&s1,&s2); 14 | printf("\nenter child's position"); 15 | scanf("%d %d",&c1,&c2); 16 | a[c1][c2]='c'; 17 | a[s1][s2]='s'; 18 | for(i=s2+1;i<=c2;i++) 19 | a[s1][i]=' '; 20 | for(i=s1+1;i 2 | void main() 3 | { 4 | char a[12][12]; 5 | int i,j,s1,s2,c1,c2; 6 | 7 | for(i=1;i<11;i++) 8 | { 9 | for(j=1;j<11;j++) 10 | a[i][j]='*'; 11 | } 12 | printf("\nenter santa's position"); 13 | scanf("%d %d",&s1,&s2); 14 | printf("\nenter child's position"); 15 | scanf("%d %d",&c1,&c2); 16 | a[c1][c2]='c'; 17 | a[s1][s2]='s'; 18 | for(i=s2+1;i<=c2;i++) 19 | a[s1][i]=' '; 20 | for(i=s1+1;i 2 | void main() 3 | { 4 | char a[12][12]; 5 | int i,j,s1,s2,c1,c2; 6 | 7 | for(i=1;i<11;i++) 8 | { 9 | for(j=1;j<11;j++) 10 | a[i][j]='*'; 11 | } 12 | printf("\n Santa's position:"); 13 | scanf("%d %d",&s1,&s2); 14 | printf("\n Child's position:"); 15 | scanf("%d %d",&c1,&c2); 16 | a[c1][c2]='c'; 17 | a[s1][s2]='s'; 18 | for(i=s2+1;i<=c2;i++) 19 | a[s1][i]=' '; 20 | for(i=s1+1;i 2 | void main() 3 | { 4 | char a[12][12]; 5 | int i,j,s1,s2,c1,c2; 6 | 7 | for(i=1;i<11;i++) 8 | { 9 | for(j=1;j<11;j++) 10 | a[i][j]='*'; 11 | } 12 | printf("\nenter santa's position"); 13 | scanf("%d %d",&s1,&s2); 14 | printf("\nenter child's position"); 15 | scanf("%d %d",&c1,&c2); 16 | a[c1][c2]='c'; 17 | a[s1][s2]='s'; 18 | for(i=s2+1;i<=c2;i++) 19 | a[s1][i]=' '; 20 | for(i=s1+1;i 2 | int vowel(char a) 3 | { 4 | if(a =='a'||a =='e'||a =='i'||a =='o'||a =='u'||a =='A'||a =='E'||a =='I'||a =='O'||a =='U') 5 | return 1; 6 | else 7 | return 0; 8 | } 9 | void main () 10 | { 11 | char a[10][10]; 12 | int i,j,r,c; 13 | printf("\n enter the no. of rows and columns"); 14 | scanf("%d%d",&r,&c); 15 | printf("\n enter the strings"); 16 | for(i=0;i 2 | int vowel(char a) 3 | { 4 | if(a =='a'||a =='e'||a =='i'||a =='o'||a =='u'||a =='A'||a =='E'||a =='I'||a =='O'||a =='U') 5 | return 1; 6 | else 7 | return 0; 8 | } 9 | void main () 10 | { 11 | char a[10][10]; 12 | int i,j,r,c; 13 | printf("\n enter the no. of rows and columns"); 14 | scanf("%d%d",&r,&c); 15 | printf("\n enter the strings"); 16 | for(i=0;i 2 | int vowel(char a) 3 | { 4 | if(a =='a'||a =='e'||a =='i'||a =='o'||a =='u'||a =='A'||a =='E'||a =='I'||a =='O'||a =='U') 5 | return 1; 6 | else 7 | return 0; 8 | } 9 | void main () 10 | { 11 | char a[10][10]; 12 | int i,j,r,c; 13 | printf("\n enter the no. of rows and columns"); 14 | scanf("%d%d",&r,&c); 15 | printf("\n enter the strings"); 16 | for(i=0;i 3 | int vowel(char a) 4 | { 5 | if(a =='a'||a =='e'||a =='i'||a =='o'||a =='u'||a =='A'||a =='E'||a =='I'||a =='O'||a =='U') 6 | return 1; 7 | else 8 | return 0; 9 | } 10 | void main () 11 | { 12 | char a[10][10]; 13 | int i,j,r,c; 14 | printf("\n enter the no. of rows and columns"); 15 | scanf("%d%d",&r,&c); 16 | printf("\n enter the strings"); 17 | for(i=0;i-1): 6 | if(vow.find(StrArr[x][y+1])>-1): 7 | if(vow.find(StrArr[x+1][y])>-1): 8 | if(vow.find(StrArr[x+1][y+1])>-1): 9 | return(str(x)+'-'+str(y)) 10 | return("Unavailable") 11 | 12 | def main(): 13 | mat=list() 14 | n = int(input("Enter number of words: ")) 15 | print("Enter words: ") 16 | for i in range(n): 17 | x = input() 18 | mat.append(x) 19 | print(vowsq(mat)) 20 | 21 | if __name__ == "__main__": 22 | main() 23 | 24 | -------------------------------------------------------------------------------- /December-27/python_sartsha.py: -------------------------------------------------------------------------------- 1 | import sys 2 | vowels = {'a','e','i','o','u'} 3 | def check(a): 4 | if a in vowels: 5 | return True 6 | else: 7 | return False 8 | 9 | arr = input('Enter strings in one line\n').split() 10 | m,n = len(arr),len(arr[0]) 11 | for i in range(m-1): 12 | for j in range(n-1): 13 | if(check(arr[i][j]) and check(arr[i+1][j]) and check(arr[i][j+1]) and check(arr[i+1][j+1])): 14 | print(str(i)+'-'+str(j)) 15 | sys.exit() 16 | print("Unavailable") 17 | -------------------------------------------------------------------------------- /December-27/python_shrufire.py: -------------------------------------------------------------------------------- 1 | def VowelSquare(a): 2 | for i in range(len(a) - 1): 3 | for l in range(len(a[i]) - 1): 4 | if a[i][l] in 'aeiou' and a[i][l+1] in 'aeiou' and a[i+1][l] in 'aeiou' and a[i+1][l+1] in 'aeiou': 5 | return str(i) + '-' + str(l) 6 | return 'not found' 7 | s=input() 8 | print(VowelSquare(s.split(','))) 9 | 10 | -------------------------------------------------------------------------------- /December-27/python_surudhi.py: -------------------------------------------------------------------------------- 1 | def VowelSquare(a): 2 | for i in range(len(a) - 1): 3 | for l in range(len(a[i]) - 1): 4 | if a[i][l] in 'aeiou' and a[i][l+1] in 'aeiou' and a[i+1][l] in 'aeiou' and a[i+1][l+1] in 'aeiou': 5 | return str(i) + '-' + str(l) 6 | return 'not found' 7 | s=input() 8 | print(VowelSquare(s.split(','))) 9 | 10 | -------------------------------------------------------------------------------- /December-28/C_28 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int i,j,a[7][7],m,n,flag=0; 5 | printf("Enter the no. of rows and columns "); 6 | scanf("%d%d",&m,&n); 7 | printf("Enter the elements "); 8 | for(i=0;i 2 | void main() 3 | { 4 | int a[10][10],i,j,r,c,x=0; 5 | printf("\n enter the number of rows and columns"); 6 | scanf("%d %d",&r,&c); 7 | printf("\n enter the elements"); 8 | for(i=0;i 2 | void main() 3 | { 4 | int a[10][10],i,j,r,c,x=0; 5 | printf("\n enter the number of rows and columns"); 6 | scanf("%d %d",&r,&c); 7 | printf("\n enter the elements"); 8 | for(i=0;i 2 | void main() 3 | { 4 | int a[10][10],i,j,r,c,x=0; 5 | printf("\n enter the number of rows and columns"); 6 | scanf("%d %d",&r,&c); 7 | printf("\n enter the elements"); 8 | for(i=0;i 2 | void main() 3 | { 4 | int a[10][10],i,j,r,c,x=0; 5 | printf("\n enter the number of rows and columns"); 6 | scanf("%d %d",&r,&c); 7 | printf("\n enter the elements"); 8 | for(i=0;i 2 | void main() 3 | { 4 | int a[10][10],i,j,r,c,x=0; 5 | printf("\n enter the number of rows and columns:\n"); 6 | scanf("%d %d",&r,&c); 7 | printf("\n enter the elements:\n"); 8 | for(i=0;i 2 | void main() 3 | { 4 | int a[10][10],i,j,r,c,x=0; 5 | printf("\n enter the number of rows and columns"); 6 | scanf("%d %d",&r,&c); 7 | printf("\n enter the elements"); 8 | for(i=0;i 2 | using namespace std; 3 | 4 | void func(int n) 5 | { 6 | int i, j = 1, k = 1; 7 | 8 | // For each iteration increase j by 1 9 | // and add it into k 10 | for (i = 1; i>n; 22 | func(n); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /December-29/C_29 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int n,s; 5 | printf("Enter the no. of friends "); 6 | scanf("%d",&n); 7 | s=n*(n-1)/2; 8 | printf("The no. of strings needed is %d",s); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /December-29/c++_kumaran_cupstring.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | main() 4 | { 5 | int n,m,res; 6 | cout<<"enter no of friends"; 7 | cin>>n; 8 | m=n-1; 9 | res=m*(m+1)/2 10 | cout<<"The no.of strings required are "< 2 | int main(void) 3 | { 4 | int n; 5 | printf("\nInput : "); 6 | scanf("%d", &n); 7 | int Res=(n*(n-1))/2; 8 | printf("Output : %d\n", Res); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /December-29/c_Sushmakarunakaran.c: -------------------------------------------------------------------------------- 1 | #include 2 | void main() 3 | { 4 | int n; 5 | printf("\n \t enter the no. friends playing with tharun"); 6 | scanf("%d",&n); 7 | n=n+1; 8 | printf("\n \t no. of strings required:%d",(n*(n-1))/2); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /December-29/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | def numstrings(n): 2 | x = int(n*(n-3)/2) 3 | print('Number of strings =',(x+n)) 4 | 5 | numstrings(int(input('Enter number of players'))) -------------------------------------------------------------------------------- /December-29/py_anuppriya_cupstring.py: -------------------------------------------------------------------------------- 1 | def numstrings(n): 2 | x = int(n*(n-3)/2) 3 | print('Number of strings =',(x+n)) 4 | 5 | numstrings(int(input('Enter number of players'))) 6 | -------------------------------------------------------------------------------- /December-29/py_imhphari.py: -------------------------------------------------------------------------------- 1 | n=int(input("Enter the number of cups needed:")) 2 | print("Number of strings needed: ",int(n*(n-1)/2)) 3 | 4 | -------------------------------------------------------------------------------- /December-29/python_AkshayaRC.py: -------------------------------------------------------------------------------- 1 | def number(n): 2 | seg=n*(n-1)//2 3 | return seg 4 | 5 | num=int(input("enter number of friends")) 6 | print("Number of strings required:",number(num)) 7 | -------------------------------------------------------------------------------- /December-29/python_MaddyDinesh_cupandstringphone.py.py: -------------------------------------------------------------------------------- 1 | n=int(input("Enter the no.of friends:")); 2 | m=n-1; 3 | res=int(m*(m+1)/2) 4 | print("The no.of strings required are ",res); 5 | -------------------------------------------------------------------------------- /December-29/python_Raahul46_cup_and_string.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | """ 4 | Hi there. 5 | This file doesn't contain any code. 6 | It's just here to give an example of the file naming scheme. 7 | Cheers! 8 | """ 9 | 10 | def cup_n_str(num): 11 | print("NO. OF STRINGS REQUIRED IS:",(num*(num-1)/2)) 12 | def main(): 13 | num=int(input("ENTER THE NO. OF FRIENDS:")) 14 | cup_n_str(num) 15 | if __name__ == '__main__': 16 | main() 17 | -------------------------------------------------------------------------------- /December-29/python_RohitMidha23.py: -------------------------------------------------------------------------------- 1 | def cup_str(num): 2 | print("Strings Required: ",(num*(num-1)/2)) 3 | 4 | n=int(input("Enter Number of Players: ")) 5 | cup_str(n) 6 | -------------------------------------------------------------------------------- /December-29/python_aashish2000_cupString.py: -------------------------------------------------------------------------------- 1 | n=int(input()) 2 | print(int((n*(n-1))/2)) -------------------------------------------------------------------------------- /December-29/python_crytotech.py: -------------------------------------------------------------------------------- 1 | def number(n): 2 | seg=n*(n-1)//2 3 | return seg 4 | 5 | num=int(input("enter number of friends")) 6 | print("Number of strings required:",number(num)) 7 | -------------------------------------------------------------------------------- /December-29/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 29 2 | friends = int(input("Enter number of friends ")) 3 | print(f"No of Strings required - {friends*(friends-1)//2}") 4 | 5 | # SAMPLE I/O 6 | # Enter number of friends 5 7 | # No of Strings required - 10 8 | -------------------------------------------------------------------------------- /December-29/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-29/python_harshith_cup&string.py: -------------------------------------------------------------------------------- 1 | x=int(input("Enter the number of sides")) 2 | y=x*(x-3) 3 | z=y/2 4 | print(int(z+x)) 5 | -------------------------------------------------------------------------------- /December-29/python_nivethitharajendran_29cupandstring.py.py: -------------------------------------------------------------------------------- 1 | n=int(input("Enter the no.of friends:")); 2 | m=n-1; 3 | res=int(m*(m+1)/2) 4 | print("The no.of strings required are ",res); 5 | -------------------------------------------------------------------------------- /December-29/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | =int(input("Enter the number of sides")) 2 | y=x*(x-3) 3 | z=y/2 4 | print(int(z+x)) 5 | -------------------------------------------------------------------------------- /December-29/python_raf1800.py: -------------------------------------------------------------------------------- 1 | def strings(n): 2 | stringcount = int(n * (n-3)/2) + n 3 | print("Number of strings: {}".format(stringcount)) 4 | 5 | def main(): 6 | x=int(input("Enter number of people: ")) 7 | strings(x) 8 | 9 | if __name__ == "__main__": 10 | main() 11 | 12 | -------------------------------------------------------------------------------- /December-29/python_sartsha.py: -------------------------------------------------------------------------------- 1 | n = int(input()) 2 | ans = n*(n-1)/2 3 | print(int(ans)) 4 | -------------------------------------------------------------------------------- /December-29/python_shrufire.py: -------------------------------------------------------------------------------- 1 | n=int(input('Enter the number of people')) 2 | if n<2: 3 | print('Cannot communicate') 4 | else: 5 | print('Number of strings required: ',int((n*(n-1))/2)) 6 | -------------------------------------------------------------------------------- /December-29/python_surudhi.py: -------------------------------------------------------------------------------- 1 | n=int(input('Enter the number of people')) 2 | if n<2: 3 | print('Cannot communicate') 4 | else: 5 | print('Number of strings required: ',int((n*(n-1))/2)) 6 | -------------------------------------------------------------------------------- /December-30/C++_koushika.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int numberOfDiagonals(int n) 5 | { 6 | return n * (n - 3) / 2; 7 | } 8 | 9 | int main() 10 | { 11 | int n = 5; 12 | cout << n << " sided polygon has "; 13 | cout << numberOfDiagonals(n) << " diagonals"; 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /December-30/C_30 AJShalini21.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int n,d; 5 | printf("Enter the no. of sides "); 6 | scanf("%d",&n); 7 | d=n*(n-3)/2; 8 | printf("The no. of diagonals is %d",d); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /December-30/c++_kumaran_noofdiag.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | // C++ function to find number of diagonals 5 | // in n sided convex polygon 6 | int numberOfDiagonals(int n) 7 | { 8 | return n * (n - 3) / 2; 9 | } 10 | 11 | // driver code to test above function 12 | int main() 13 | { 14 | int n ; 15 | cin>>n ; 16 | cout << numberOfDiagonals(n) << " diagonals"; 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /December-30/c_Nilesh2000.c: -------------------------------------------------------------------------------- 1 | # include 2 | int main(void) 3 | { 4 | int n; 5 | printf("\nInput : "); 6 | scanf("%d", &n); 7 | int Diagonals=(n*(n-3))/2; 8 | printf("Output : %d\n", Diagonals); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /December-30/c_Sushmakarunakaran.c: -------------------------------------------------------------------------------- 1 | #include 2 | void main () 3 | { 4 | int n; 5 | printf("\n \t enter the no. of sides"); 6 | scanf("%d",&n); 7 | printf("\n \t No. of diagonals:%d",((n*(n-1))/2)-n); 8 | } 9 | -------------------------------------------------------------------------------- /December-30/go_arjunAravind.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "bufio" 6 | "os" 7 | "strconv" 8 | ) 9 | 10 | func GetValue() int { 11 | 12 | scanner := bufio.NewScanner(os.Stdin) 13 | _ = scanner.Scan() 14 | 15 | enteredNumber, _ := strconv.Atoi(scanner.Text()) 16 | return enteredNumber 17 | 18 | } 19 | 20 | func main() { 21 | 22 | fmt.Printf("Enter the number of sides --> ") 23 | sides := GetValue() 24 | 25 | diagonals := (sides * (sides-3)) / 2 //Figured out this formula myself 26 | fmt.Printf("The number of diagonals is %v.\n", diagonals) 27 | 28 | } 29 | -------------------------------------------------------------------------------- /December-30/py_ajaykrishnan23.py: -------------------------------------------------------------------------------- 1 | def numdiag(n): 2 | x = int(n*(n-3)/2) 3 | print(n,'Vertices =',x,'Diagonals') 4 | 5 | n = int(input('Enter number of diagonals')) 6 | numdiag(n) -------------------------------------------------------------------------------- /December-30/py_anuppriya_noofdiagnols.py: -------------------------------------------------------------------------------- 1 | def numdiag(n): 2 | x = int(n*(n-3)/2) 3 | print(n,'Vertices =',x,'Diagonals') 4 | 5 | n = int(input('Enter number of diagonals')) 6 | numdiag(n) 7 | -------------------------------------------------------------------------------- /December-30/py_imhphari.py: -------------------------------------------------------------------------------- 1 | n=int(input("Enter the number of sides in the polygon:")) 2 | if(n<3): 3 | print("Number of diagonals: 1") 4 | else: 5 | print("Number of diagonals: ",int(n*(n-3)/2)) 6 | 7 | -------------------------------------------------------------------------------- /December-30/python_AkshayaRC.py: -------------------------------------------------------------------------------- 1 | def diagonals(n): 2 | if n<=3: 3 | diag=0 4 | else: 5 | segments=n*(n-1)//2 6 | diag=segments-n 7 | return diag 8 | 9 | n=int(input("enter n sides: ")) 10 | print("No.of diagonals:",diagonals(n)) 11 | 12 | -------------------------------------------------------------------------------- /December-30/python_MaddyDinesh_numberofdiagonals.py.py: -------------------------------------------------------------------------------- 1 | n=int(input("Enter the no.of.sides:")); 2 | d=int(n*(n-3)/2) 3 | print("The no.of. diagonals are",d); 4 | -------------------------------------------------------------------------------- /December-30/python_Raahul46_no_of_diagonals.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | """ 4 | Hi there. 5 | This file doesn't contain any code. 6 | It's just here to give an example of the file naming scheme. 7 | Cheers! 8 | """ 9 | 10 | def no_of_diagonals(num): 11 | print("NO. OF DIAGONALS IS:",(num*(num-3)/2)) 12 | def main(): 13 | num=int(input("ENTER THE NO. OF VERTEX:")) 14 | no_of_diagonals(num) 15 | if __name__ == '__main__': 16 | main() 17 | -------------------------------------------------------------------------------- /December-30/python_RohitMidha23.py: -------------------------------------------------------------------------------- 1 | def number_diagnols(n): 2 | x = int(n*(n-3)/2) 3 | print(x,'Diagonals!') 4 | 5 | num = int(input('Enter Number of Diagonals :')) 6 | number_diagnols(num) 7 | -------------------------------------------------------------------------------- /December-30/python_aashish2000_diag.py: -------------------------------------------------------------------------------- 1 | n=int(input()) 2 | print (int((n*(n-3))/2)) -------------------------------------------------------------------------------- /December-30/python_crytotech.py: -------------------------------------------------------------------------------- 1 | def diagonals(n): 2 | if n<=3: 3 | diag=0 4 | else: 5 | segments=n*(n-1)//2 6 | diag=segments-n 7 | return diag 8 | 9 | n=int(input("enter n sides: ")) 10 | print("No.of diagonals:",diagonals(n)) 11 | -------------------------------------------------------------------------------- /December-30/python_drstrange11.py: -------------------------------------------------------------------------------- 1 | # Dec 30 2 | sides = int(input('Enter the sides: ')) 3 | print(f"Number of diagonals = {sides*(sides-3)//2}") 4 | 5 | # SAMPLE I/O 6 | # Enter the sides: 4 7 | # Number of diagonals = 2 8 | -------------------------------------------------------------------------------- /December-30/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-30/python_harshith_diagonals.py: -------------------------------------------------------------------------------- 1 | x=int(input("Enter the number of sides")) 2 | y=x*(x-3) 3 | z=y/2 4 | print(int(z)) 5 | -------------------------------------------------------------------------------- /December-30/python_nivethitharajendran_30diagonals.py.py: -------------------------------------------------------------------------------- 1 | n=int(input("Enter the no.of.sides:")); 2 | d=int(n*(n-3)/2) 3 | print("The no.of. diagonals are",d); 4 | -------------------------------------------------------------------------------- /December-30/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | x=int(input("Enter the number of sides")) 2 | y=x*(x-3) 3 | z=y/2 4 | print(int(z)) 5 | -------------------------------------------------------------------------------- /December-30/python_raf1800.py: -------------------------------------------------------------------------------- 1 | def di(n): 2 | diags = int(n * (n-3)/2) 3 | print("Number of diagonals: {}".format(diags)) 4 | 5 | def main(): 6 | x=int(input("Enter number of sides: ")) 7 | di(x) 8 | 9 | if __name__ == "__main__": 10 | main() 11 | 12 | -------------------------------------------------------------------------------- /December-30/python_sartsha.py: -------------------------------------------------------------------------------- 1 | n=int(input()) 2 | ans = n*(n-1)/2 -n 3 | print(int(ans)) 4 | -------------------------------------------------------------------------------- /December-30/python_shrufire.py: -------------------------------------------------------------------------------- 1 | n=int(input('Enter the number of sides of the polygon')) 2 | if n<4: 3 | print('Diagonals do not exist') 4 | else: 5 | print('Number of diagonals are: ',int((n*(n-3))/2)) 6 | -------------------------------------------------------------------------------- /December-30/python_surudhi.py: -------------------------------------------------------------------------------- 1 | n=int(input('Enter the number of sides of the polygon')) 2 | if n<4: 3 | print('Diagonals do not exist') 4 | else: 5 | print('Number of diagonals are: ',int((n*(n-3))/2)) 6 | -------------------------------------------------------------------------------- /December-31/closest_cell_harshith_python.py: -------------------------------------------------------------------------------- 1 | def cc(a): 2 | r = len(a) 3 | c = len(a[0]) 4 | s = 100 5 | for i in range(r): 6 | for j in range(c): 7 | if a[i][j] == 1: 8 | break 9 | if a[i][j] ==1: 10 | break 11 | for k in range(r): 12 | for l in range(c): 13 | if a[k][l]==2: 14 | print(i,j,k,l) 15 | x = abs(i-k)+abs(j-l) 16 | if x0: 20 | print(s) 21 | else: 22 | print(0) 23 | r1 = int(input('Enter number of rows:')) 24 | c1 = int(input('Enter number of columns:')) 25 | m= [ [0 for i in range(0,c1)] for j in range(0,r1)] 26 | print('Enter matrix') 27 | for i in range(r1): 28 | for j in range(c1): 29 | m[i][j] = int(input('Enter element')) 30 | cc(m) 31 | -------------------------------------------------------------------------------- /December-31/python_aashish2000_ClosestCell.py: -------------------------------------------------------------------------------- 1 | mat=list(map(str,input("2D Matrix input: ").split(','))) 2 | 3 | lx=0 4 | ly=0 5 | f=0 6 | loc2=[] 7 | for x in range(len(mat)): 8 | for y in range(len(mat[0])): 9 | if(mat[x][y]=='1'): 10 | f=1 11 | lx=int(x) 12 | ly=int(y) 13 | if(mat[x][y]=='2'): 14 | loc2.append([int(x),int(y)]) 15 | if(loc2!=[]): 16 | dist=[] 17 | for i in range(len(loc2)): 18 | ax=abs(loc2[i][0]-lx) 19 | bx=abs(len(mat[0])-ax) 20 | ay=abs(loc2[i][1]-ly) 21 | by=abs(len(mat[1])-ay) 22 | dist.append(min(ax,bx)+min(ay,by)) 23 | 24 | print("Output: ",min(dist)) 25 | else: 26 | print("Output: ",0) 27 | 28 | -------------------------------------------------------------------------------- /December-31/python_exampleUser.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /December-31/python_kumaran_closest.py: -------------------------------------------------------------------------------- 1 | def cc(a): 2 | r = len(a) 3 | c = len(a[0]) 4 | s = 100 5 | for i in range(r): 6 | for j in range(c): 7 | if a[i][j] == 1: 8 | break 9 | if a[i][j] ==1: 10 | break 11 | for k in range(r): 12 | for l in range(c): 13 | if a[k][l]==2: 14 | print(i,j,k,l) 15 | x = abs(i-k)+abs(j-l) 16 | if x0: 20 | print(s) 21 | else: 22 | print(0) 23 | r1 = int(input('Enter number of rows:')) 24 | c1 = int(input('Enter number of columns:')) 25 | m= [ [0 for i in range(0,c1)] for j in range(0,r1)] 26 | print('Enter matrix') 27 | for i in range(r1): 28 | for j in range(c1): 29 | m[i][j] = int(input('Enter element')) 30 | cc(m) -------------------------------------------------------------------------------- /December-31/python_prasanna77cr7.py: -------------------------------------------------------------------------------- 1 | def cc(a): 2 | r = len(a) 3 | c = len(a[0]) 4 | s = 100 5 | for i in range(r): 6 | for j in range(c): 7 | if a[i][j] == 1: 8 | break 9 | if a[i][j] ==1: 10 | break 11 | for k in range(r): 12 | for l in range(c): 13 | if a[k][l]==2: 14 | print(i,j,k,l) 15 | x = abs(i-k)+abs(j-l) 16 | if x0: 20 | print(s) 21 | else: 22 | print(0) 23 | r1 = int(input('Enter number of rows:')) 24 | c1 = int(input('Enter number of columns:')) 25 | m= [ [0 for i in range(0,c1)] for j in range(0,r1)] 26 | print('Enter matrix') 27 | for i in range(r1): 28 | for j in range(c1): 29 | m[i][j] = int(input('Enter element')) 30 | cc(m) 31 | -------------------------------------------------------------------------------- /src/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/assets/Header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SVCE-ACM/A-December-of-Algorithms/32435cca75b9898f915a976f8d51b706a08393d7/src/assets/Header.png -------------------------------------------------------------------------------- /src/docs/Dec17-Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SVCE-ACM/A-December-of-Algorithms/32435cca75b9898f915a976f8d51b706a08393d7/src/docs/Dec17-Example.png -------------------------------------------------------------------------------- /src/docs/Dec18-1000_most_common_passwords.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SVCE-ACM/A-December-of-Algorithms/32435cca75b9898f915a976f8d51b706a08393d7/src/docs/Dec18-1000_most_common_passwords.txt -------------------------------------------------------------------------------- /src/docs/Dec20-Example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SVCE-ACM/A-December-of-Algorithms/32435cca75b9898f915a976f8d51b706a08393d7/src/docs/Dec20-Example.jpg -------------------------------------------------------------------------------- /src/docs/Dec21-Exchange_Rates.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SVCE-ACM/A-December-of-Algorithms/32435cca75b9898f915a976f8d51b706a08393d7/src/docs/Dec21-Exchange_Rates.csv -------------------------------------------------------------------------------- /src/docs/Dec25-Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SVCE-ACM/A-December-of-Algorithms/32435cca75b9898f915a976f8d51b706a08393d7/src/docs/Dec25-Example.png -------------------------------------------------------------------------------- /src/docs/Dec30-ExampleImg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SVCE-ACM/A-December-of-Algorithms/32435cca75b9898f915a976f8d51b706a08393d7/src/docs/Dec30-ExampleImg.jpg -------------------------------------------------------------------------------- /src/docs/dec29-mesh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SVCE-ACM/A-December-of-Algorithms/32435cca75b9898f915a976f8d51b706a08393d7/src/docs/dec29-mesh.jpg -------------------------------------------------------------------------------- /src/docs/dec29-string-phone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SVCE-ACM/A-December-of-Algorithms/32435cca75b9898f915a976f8d51b706a08393d7/src/docs/dec29-string-phone.jpg --------------------------------------------------------------------------------