PyCharm Edu introduction course, string multiplication
<p>I'm new to Python and currently running the "Introduction to Python" course for PyCharm Edu. I'm having a problem with the following task (strings -> string multiplication)</p>

<blockquote>
  <p>Python supports a string-by-number multiplication (but not the other
  way around!). </p>
  
  <p>Use hello to get the
  "hellohellohellohellohellohellohellohellohellohello" string ("hello"
  repeated 10 times).</p>
</blockquote>

<p>The default given code is </p>

<pre><code>hello = "hello"
ten_of_hellos = hello operator 10
print(ten_of_hellos)
</code></pre>

<p>so I just replace the word operator with the * sign, so I have</p>

<pre><code>hello = "hello"
ten_of_hellos = hello * 10
print(ten_of_hellos)
</code></pre>

<p>but I get an error saying "use multiplication". Any idea of what I'm doing wrong?</p>

<p>There was a missing else in the code that was fixed Aug 13, 2016 (<a href="https://github.com/lbilger/pycharm-courses/commit/32b4d3e9adc32e7b9c6a293e4c6e2bcc29b35210" rel="nofollow">see commit on github</a>). However, the current Version: 2016.2.3 Released: September 6, 2016 is still missing the 'else' in the test.py file for lesson3, task2. </p>

<p>The easiest fix is to open the tests.py file in a text editor or IDE, copy and paste the updated code from <a href="https://github.com/lbilger/pycharm-courses/blob/32b4d3e9adc32e7b9c6a293e4c6e2bcc29b35210/introduction_course/lesson3/task2/tests.py" rel="nofollow">github</a>, save the file, then re-run the check. You shouldn't need to re-start PyCharm. When you re-run the checker, it should pass immediately. </p>

<p>If you have trouble locating the file on a PC. You can use your computers search tool to search ThisPC for PyCharmIntroduction. It will be in the same sub folder shown by the previous post: lesson3 -> task2 -> tests.py</p>

<p>Various answers will pass:</p>

<pre><code>hello = "hello"
ten_of_hellos = hello * 10
print(ten_of_hellos)
</code></pre>

<p>OR </p>

<pre><code>ten_of_hellos = "hello" * 10
print(ten_of_hellos)
</code></pre>

<p>OR even (not recommended but shown to demonstrate parameters to pass) </p>

<pre><code>ten_of_hellos = "hello" * 10
print("hellohellohellohellohellohellohellohellohellohello")
</code></pre>

python pycharm