<p>Assuming that you have solved some of the problems in Java, you have an &quot;oracle&quot; for your python solution. Rework a problem in Python and compare the results of your two solutions. The advantage is that since you have a basic idea of an algorithm to solve the problem, you can concentrate more on how to express the algorithm in a different language. If the web site gives you both the test cases and expected results, you are half way there. If not, you may also need to add code for you to test your Java solution independently of the web site.</p>
<p>You will need a method of testing your python solution. Building the code necessary to test your solution and thinking up test cases is an incredibly valuable skill to learn. You might try rolling your own (learn how to use command line parameters) or learn to use one of the unit testing frameworks (search for python unit testing). In either case you will need to come up with test cases and feed them to your code. You can validate your python solution by comparing its result to the &quot;oracle&quot; result.</p>
<p>You may find that you are initially writing Java code in python. This is natural as one transitions between languages. Over time (and by code reading other python examples) you will find yourself thinking in python. You might also look at <a href="https://openbookproject.net/thinkcs/python/english3e/" rel="nofollow noreferrer">https://openbookproject.net/thinkcs/python/english3e/</a> and <a href="https://openbookproject.net/thinkcs/python/english3e/" rel="nofollow noreferrer">https://openbookproject.net/thinkcs/python/english3e/</a> which are two similar texts (viewable free online) that approach the same material in both Java and Python.</p>

CC BY-SA 4.0
2021-03-22T16:17:21.907Z
Actually, I recommend against this. Accept Python for what it is. Pretend you don't actually know Java when solving problems.
Buffy
CC BY-SA 4.0
2021-03-22T16:12:30.760Z
2021-03-22T21:14:39.030Z
2021-03-22T21:14:39.030Z
Fritz Sieker
<p>I didn't spend a huge amount of time looking over the practiceit resource you linked, but I glanced at a few problems, and they seemed similar to <a href="http://codingbat.com" rel="nofollow noreferrer">http://codingbat.com</a>, which has exercises in both Java and Python.</p>

CC BY-SA 4.0
2021-03-22T09:08:01.083Z
Thank you for the reply--I checked the website, and it seemed to be a useful tool..!
user9487
CC BY-SA 4.0
2021-03-18T19:08:49.013Z
2021-03-18T19:08:49.013Z
Ben I.
<p>Hackerrank has good basic programming questions</p>
<p>Codewars is great for having a sense of a group and have a healthy competition. The dashboard will show your score and ranking between friends and same institution.</p>
<p><a href="https://i.sstatic.net/dDvei.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dDvei.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-04-07T16:50:03.113Z
2021-04-07T16:50:03.113Z
Clark Ngo
<p>This not-quite-answer hopes to give you some guidance on your self learning, beyond what you ask. But first, learning Python to fulfill another purpose, such as taking a course that requires it, is fine. Need driven learning, as it were.</p>
<p>But you have only written small (tiny, actually) programs in Java, certainly too small to teach you the advantages of OO programming in any language. And learning a lot of languages to write small programs is definitely NOT a CS education. In fact programming, in any language, is only a small part of a CS education, and only a tool for a larger purpose.</p>
<p>I suggest that, pretty soon you branch out. One way is to take on a really big project; maybe 50 <em>pages</em> of needed code. But you will also need a good grounding in data structures and algorithms (that is two things, not one) if you don't already have that. You will need those <em>in spades</em> to become a data scientist. You should also, probably soon, take a course in database (both theory and practice, not just SQL).</p>
<p>I suggest, also, that while learning Python after Java, that you focus on their differences, not their similarities. They are, in many ways quite similar, but the fact that Python checks the types of things only at runtime (Java at compile time) requires a different mind set. The syntactic differences are minor by comparison. Do a search for &quot;pythonic&quot; to get a sense about how a skilled Python programmer thinks.</p>
<p>But the key point here is &quot;lots of languages does not a computer scientist make&quot;. Go deep in some language before you try to go broad. Otherwise you are just paddling in the kiddie pool.</p>
<p>As to the question itself, no, I don't have a website to suggest. But if you have a good Java site you can answer the questions with a Pythonic view. You can, and should, build yourself a testing framework in which to test your answers to many (most?) of the questions to assure that you get what you expect, even if it is harder to test your <em>style</em>. For that, a critique by an expert would be most helpful, provided you can find someone.</p>

CC BY-SA 4.0
2021-03-24T15:40:44.973Z
Thank you for the detailed response, Dr. Buffy. I took a careful look at the courses offered at my university's computer science department, and it appears that data structure, algorithms, and databases are courses offered to sophomores and juniors. If possible, I will attempt to preview those subjects, which I think would be a wise thing to do before I challenge myself to a project of such scale. Thank you again for your response.
user9487
CC BY-SA 4.0
2021-03-22T16:34:50.870Z
2021-03-22T16:34:50.870Z
Buffy
<p>I'm a high school student who has learned Java with the AP Computer Science A curriculum at school. My CS class used the University of Washington's <a href="https://practiceit.cs.washington.edu/" rel="nofollow noreferrer">Practice-it site</a> for practicing Java. I was wondering whether there was a similar open-to-public site for practicing Python, but I was unable to find a Python-practice website that matched Practice-it at the scale and quality of the problems. Could anyone provide some suggestions as to which website I could use?</p>
<p>The reason why I want to study Python is because I wish to take an introductory class to deep learning on Coursera that uses Python. But because I only learned Java in high school, I studied Python on my own, and was looking for a website where I could practice writing programs in Python. Also, because I am looking into becoming a data scientist, I am taking the <a href="https://www.coursera.org/learn/python-data-analysis" rel="nofollow noreferrer">applied data science course provided by UMichigan on Coursera</a></p>
<p>The most complicated Java program that I wrote was a 321-line long superclass and a corresponding 60-line client code that when executed, produces an interactive four-in-a-row game.</p>

CC BY-SA 4.0
2021-03-18T19:34:02.143Z
I have some ideas to give you guidance, but they aren't an answer to your question. But I'd need to know more about why you want to learn Python specifically. The insight I have is that learning a lot of languages at an elementary level isn't really a CS education. But if Python is truly important to you then the answers would be different. Can you edit the question to say more? BenI. also has some ideas that may complement mine.
Buffy
CC BY-SA 4.0
2021-03-18T19:40:05.490Z
It might actually help to know the size of the largest, most complex, Java program you've written.
Buffy
CC BY-SA 4.0
2021-03-22T10:47:55.523Z
@Buffy Thank you for your reply, Dr. Buffy--I edited my question as you requested. This year, I was accepted into an economics major program at a university, but I am thinking about double majoring in computer science. The reason why I wanted to study economics was because I was interested in applying mathematics to study society. But after I read more about Lee Sedol's loss to Alphago back in 2016, I wanted to learn more about deep learning and A.I.--two fields of computer science that also frequently use mathematics.
user9487
<python>
Best online problem-bank style practice site for Python
# Best online problem-bank style practice site for Python

(Asked by: username_0 on 2021-03-18)

I'm a high school student who has learned Java with the AP Computer Science A curriculum at school. My CS class used the University of Washington's [Practice-it site](https://practiceit.cs.washington.edu/) for practicing Java. I was wondering whether there was a similar open-to-public site for practicing Python, but I was unable to find a Python-practice website that matched Practice-it at the scale and quality of the problems. Could anyone provide some suggestions as to which website I could use?

The reason why I want to study Python is because I wish to take an introductory class to deep learning on Coursera that uses Python. But because I only learned Java in high school, I studied Python on my own, and was looking for a website where I could practice writing programs in Python. Also, because I am looking into becoming a data scientist, I am taking the [applied data science course provided by UMichigan on Coursera](https://www.coursera.org/learn/python-data-analysis)

The most complicated Java program that I wrote was a 321-line long superclass and a corresponding 60-line client code that when executed, produces an interactive four-in-a-row game.

**Tags:** python

> **Comments:**
> **username_1**: I have some ideas to give you guidance, but they aren't an answer to your question. But I'd need to know more about why you want to learn Python specifically. The insight I have is that learning a lot of languages at an elementary level isn't really a CS education. But if Python is truly important to you then the answers would be different. Can you edit the question to say more? BenI. also has some ideas that may complement mine.  
> **username_1**: It might actually help to know the size of the largest, most complex, Java program you've written.  
> **username_0**: @username_1 Thank you for your reply, Dr. username_1--I edited my question as you requested. This year, I was accepted into an economics major program at a university, but I am thinking about double majoring in computer science. The reason why I wanted to study economics was because I was interested in applying mathematics to study society. But after I read more about Lee Sedol's loss to Alphago back in 2016, I wanted to learn more about deep learning and A.I.--two fields of computer science that also frequently use mathematics.  

---

## 4 answers

### Answer by username_1 on 2021-03-22. Score: 1 | Accepted answer

This not-quite-answer hopes to give you some guidance on your self learning, beyond what you ask. But first, learning Python to fulfill another purpose, such as taking a course that requires it, is fine. Need driven learning, as it were.

But you have only written small (tiny, actually) programs in Java, certainly too small to teach you the advantages of OO programming in any language. And learning a lot of languages to write small programs is definitely NOT a CS education. In fact programming, in any language, is only a small part of a CS education, and only a tool for a larger purpose.

I suggest that, pretty soon you branch out. One way is to take on a really big project; maybe 50 *pages* of needed code. But you will also need a good grounding in data structures and algorithms (that is two things, not one) if you don't already have that. You will need those *in spades* to become a data scientist. You should also, probably soon, take a course in database (both theory and practice, not just SQL).

I suggest, also, that while learning Python after Java, that you focus on their differences, not their similarities. They are, in many ways quite similar, but the fact that Python checks the types of things only at runtime (Java at compile time) requires a different mind set. The syntactic differences are minor by comparison. Do a search for "pythonic" to get a sense about how a skilled Python programmer thinks.

But the key point here is "lots of languages does not a computer scientist make". Go deep in some language before you try to go broad. Otherwise you are just paddling in the kiddie pool.

As to the question itself, no, I don't have a website to suggest. But if you have a good Java site you can answer the questions with a Pythonic view. You can, and should, build yourself a testing framework in which to test your answers to many (most?) of the questions to assure that you get what you expect, even if it is harder to test your *style*. For that, a critique by an expert would be most helpful, provided you can find someone.

> **Comments:**
> **username_0**: Thank you for the detailed response, Dr. username_1. I took a careful look at the courses offered at my university's computer science department, and it appears that data structure, algorithms, and databases are courses offered to sophomores and juniors. If possible, I will attempt to preview those subjects, which I think would be a wise thing to do before I challenge myself to a project of such scale. Thank you again for your response.  

---

### Answer by username_2 on 2021-03-22. Score: 2

Assuming that you have solved some of the problems in Java, you have an "oracle" for your python solution. Rework a problem in Python and compare the results of your two solutions. The advantage is that since you have a basic idea of an algorithm to solve the problem, you can concentrate more on how to express the algorithm in a different language. If the web site gives you both the test cases and expected results, you are half way there. If not, you may also need to add code for you to test your Java solution independently of the web site.

You will need a method of testing your python solution. Building the code necessary to test your solution and thinking up test cases is an incredibly valuable skill to learn. You might try rolling your own (learn how to use command line parameters) or learn to use one of the unit testing frameworks (search for python unit testing). In either case you will need to come up with test cases and feed them to your code. You can validate your python solution by comparing its result to the "oracle" result.

You may find that you are initially writing Java code in python. This is natural as one transitions between languages. Over time (and by code reading other python examples) you will find yourself thinking in python. You might also look at <https://openbookproject.net/thinkcs/python/english3e/> and <https://openbookproject.net/thinkcs/python/english3e/> which are two similar texts (viewable free online) that approach the same material in both Java and Python.

> **Comments:**
> **username_1**: Actually, I recommend against this. Accept Python for what it is. Pretend you don't actually know Java when solving problems.  

---

### Answer by username_3 on 2021-03-18. Score: 2

I didn't spend a huge amount of time looking over the practiceit resource you linked, but I glanced at a few problems, and they seemed similar to <http://codingbat.com>, which has exercises in both Java and Python.

> **Comments:**
> **username_0**: Thank you for the reply--I checked the website, and it seemed to be a useful tool..!  

---

### Answer by username_4 on 2021-04-07. Score: 1

Hackerrank has good basic programming questions

Codewars is great for having a sense of a group and have a healthy competition. The dashboard will show your score and ranking between friends and same institution.

[![enter image description here](https://i.sstatic.net/dDvei.jpg)](https://i.sstatic.net/dDvei.jpg)


---

