Skip to content

Commit

Permalink
Problems of the day
Browse files Browse the repository at this point in the history
  • Loading branch information
danfimov committed Feb 1, 2021
1 parent 63a8e22 commit fd6c7e0
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Python Developer/HyperJob Agency/Problems/10 files/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
for i in range(1,11):
with open('file'+str(i) + '.txt', 'w') as file:
print(i, file=file)
12 changes: 12 additions & 0 deletions Python Developer/HyperJob Agency/Problems/10 files/task-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: code
files:
- name: main.py
visible: true
text: '# write your code here'
learner_created: false
feedback_link: https://hyperskill.org/learn/step/8710#comment
status: Solved
feedback:
message: <html>Correct solution</html>
time: Mon, 01 Feb 2021 06:44:26 UTC
record: -1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id: 8710
update_date: Sun, 04 Oct 2020 19:59:58 UTC
17 changes: 17 additions & 0 deletions Python Developer/HyperJob Agency/Problems/10 files/task.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<h2>10 files</h2>
<html>
<head></head>
<body>
<p>Create 10 files, named <strong>file1.txt, file2.txt </strong>and so on till <strong>file10.txt. </strong>The files should contain the number corresponding to their name. So, <strong>file1.txt </strong>should contain one line with number <code class="java">1</code>, <strong>file2.txt — </strong>one line with number <code class="java">2</code> and so on.</p>
<p><button class="btn-sm btn-outline-secondary" onclick="getElementById('hint-386').style.display='inline'"> Hint </button> </p>
<div id="hint-386" style="display:none;">
Open files within a
<code class="java">for</code> loop to make things simpler. And don't forget to close the files!
</div>
<p></p>
</body>
</html><br><br><font color="gray">Memory limit: 256 MB</font><br><font color="gray">Time limit: 15 seconds</font><br><br>
<b>Caution</b><br><br>
You may see errors in your code or execution results due to missing context. Don’t worry about it, just write the solution and press Check.
<br><br>
<a href="https://hyperskill.org/learn/step/8702">Show topic summary</a>
16 changes: 16 additions & 0 deletions Python Developer/HyperJob Agency/Problems/Spellchecker/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
dictionary = ['all', 'an', 'and', 'as', 'closely', 'correct', 'equivocal',
'examine', 'indication', 'is', 'means', 'minutely', 'or', 'scrutinize',
'sign', 'the', 'to', 'uncertain']

flag = True

user_input = list(input().split())
for word in user_input:
if word in dictionary:
pass
else:
print(word)
flag = False

if flag:
print('OK')
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
type: code
files:
- name: main.py
visible: true
text: |-
dictionary = ['all', 'an', 'and', 'as', 'closely', 'correct', 'equivocal',
'examine', 'indication', 'is', 'means', 'minutely', 'or', 'scrutinize',
'sign', 'the', 'to', 'uncertain']
learner_created: false
feedback_link: https://hyperskill.org/learn/step/6551#comment
status: Solved
feedback:
message: <html>Correct solution</html>
time: Mon, 01 Feb 2021 06:41:29 UTC
record: -1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id: 6551
update_date: Thu, 16 Jul 2020 08:20:21 UTC
12 changes: 12 additions & 0 deletions Python Developer/HyperJob Agency/Problems/Spellchecker/task.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<h2>Spellchecker</h2>
<html>
<head></head>
<body>
<p>Write a spellchecker that tells you which words in the sentence are spelled incorrectly. Use the dictionary in the code below.</p>
<p><strong>The input format:</strong></p>
<p>A sentence. All words are in the lowercase.</p>
<p><strong>The output format:</strong></p>
<p>All incorrectly spelled words in the order of their appearance in the sentence. If all words are spelled correctly, print <strong>OK</strong>.</p>
</body>
</html><br><b>Sample Input:</b><br><pre><code class="language-no-highlight">srutinize is to examene closely and minutely</code></pre><br><b>Sample Output:</b><br><pre><code class="language-no-highlight">srutinize<br>examene</code></pre><br><br><b>Sample Input:</b><br><pre><code class="language-no-highlight">all correct</code></pre><br><b>Sample Output:</b><br><pre><code class="language-no-highlight">OK</code></pre><br><br><br><font color="gray">Memory limit: 256 MB</font><br><font color="gray">Time limit: 15 seconds</font><br><br>
<a href="https://hyperskill.org/learn/step/6972">Show topic summary</a>
3 changes: 3 additions & 0 deletions Python Developer/HyperJob Agency/Problems/lesson-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
content:
- Spellchecker
- 10 files

0 comments on commit fd6c7e0

Please sign in to comment.