Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f4a796c

Browse files
committedNov 15, 2024·
Added a more detailed task description
1 parent 74e8cf8 commit f4a796c

File tree

1 file changed

+6
-3
lines changed
  • Condition expressions/Single-line if-else statement

1 file changed

+6
-3
lines changed
 
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
## Single-line if-else statement
1+
As you saw in the previous tasks, a simple `if-else` statement can in fact be written as a single line.
22

3-
As you saw in the previous tasks, a simple `if-else` statement can in fact be written as a single line. Rewrite the statement in the code editor so that it
4-
fits in one line but the results of its execution remain exactly the same.
3+
### Task
4+
Rewrite the statement in the code editor so that it
5+
fits in one line but the results of its execution remain exactly the same:
6+
- If `my_random_number` is greater than 50, program should print `my_random_number` itself.
7+
- Otherwise, print message `"Too small!"`.
58

69
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5932#simple-if-else?utm_source=jba&utm_medium=jba_courses_links).

0 commit comments

Comments
 (0)
Please sign in to comment.