HI GUYS I'M DEEPLY DESPERATE TO KNOW HOW TO CONVERT THE CODE FROM PHYTON TO JAVA, MY TASK IS DUE TOMORROW PLEASE HELP MEEEEE T_T

How far have you got? What exactly do you need to move on?

By now everyone should know that posting in ALL CAPS is the internet equivalent of shouting. Keep in mind that what may seem a crisis to you is not a crisis to us. We expect to see proof that you have put in some effort to solve the problem yourself. In this case you have not even gone to the trouble of posting the code you are having trouble converting. That's the equivalent of calling 911 from a pay phone, shouting HELP, then hanging up.

In the interim, please read the Daniweb Posting Rules and Suggestions For Posting Questions.

I see others have weighed in so my view is that sometimes you need to have such work done for you. Look at sites such as Upwork and others to have it done. Companies don't always have staff to cover all needs so they outsource. Here we tend to have you show your work and then you tell us where you are stuck so all can comment how it might be solved.

Assuming there is no magic free direct conversion tool, convert the python to pseudo code and then to JAVA. This will test your knowledge of when python does nice things for you automatically, which you may need to do manually in JAVA. You may be able to use more appropriate containers in this process.

As I read this post, I found it to be very helpful. Thank you for posting it. I enjoyed reading it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.