You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chapter-07-complex-loops-exam-problems.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,10 @@ We already learned how to execute **a block of commands more than once** using a
11
11
12
12
## Exam Problems
13
13
14
-
Let's start work on solving the following practical exam problems.
14
+
Let's start work on solving the following practice exam problems.
15
15
16
16
17
-
## Problem: Dumb Passwords Generator
17
+
## Problem: Stupid Password Generator
18
18
19
19
Write a program that enters two integers **n** and **l** and generates in alphabetical order all possible **"dumb" passwords** that consist of the following **5 characters**:
20
20
- Character 1: digit from **1** to **n**.
@@ -45,7 +45,7 @@ Print on the console **all "dumb" passwords in alphabetical order**, separated b
45
45
46
46
We can split the solution of the problem into 3 parts:
47
47
48
-
***Reading the input** – in the current problem, this includes reading two numbers **`n`** and **`l`** and converting them to numbers.
48
+
***Reading the input** – in the current problem, this includes reading two numbers **`n`** and **`l`**, and converting them to numbers.
49
49
***Processing the input data** – using nested loops to iterate through every possible symbol for each of the five password symbols.
50
50
***Printing the output** – printing every "dumb" password that meets the requirements.
51
51
@@ -220,7 +220,7 @@ Write a program that reads from the console 1 integer within the range [**100
220
220
- If the number is divisible by **3** without remainder, **subtract** from it **its second digit**
221
221
- If none of the above-mentioned conditions is valid, **add** to it **its third digit**.
222
222
223
-
Print on the console **N lines**, and each line has **M numbers**, that are the result of the above actions.
223
+
Print on the console **N lines** and each line has **M numbers**, that are the result of the above actions.
224
224
- N = sum of the first and second digits of the number.
225
225
- M = sum of the first and third digits of the number.
0 commit comments