-
A good Cloud Engineer uses codeblocks whenever possible.
-
Because it allows others to view your code and try to replicate what you did!
def alternating_characters?(s)
type = [/[aeiou]/, /[^aeiou]/].cycle
if s.start_with?(/[^aeiou]/)
type.next
end
s.chars.all? { |ch| ch.match?(type.next) }
end
alternating_characters?("ateciyu")
# true
# Store input numbers
num1 = input('Enter first number: ')
num2 = input('Enter second number: ')
# Add two numbers
sum = float(num1) + float(num2)
# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
Below is an example
$ RBENV_VERSION=2.5.0 ruby division_service.rb 5 0
Traceback (most recent call last):
2: from division_service.rb:13:in `<main>'
1: from division_service.rb:9:in `divide'
division_service.rb:9:in `/': divided by 0 (ZeroDivisionError)
$
Github extends Markdown to have a list where you can check off items.[1]
- Finish Step 1
- Finish Step 2
- Finish Step 3
Github Flavored Markdown (GFM) Supports Emojis 🤯
Section 1 | Section 2 |
---|---|
Face | Sports |
😄 | 🏀 |
🤠 | 🏈 |
Section 1 | Section 2 |
---|---|
Code | Emoji |
:dog: |
🐶 |
:owl: |
🦉 |
You can use the following format to create tables!
| Section 1 | Section 2 |
| :-----------: | :------------: |
| **Code** | **Emoji** |
| `:dog:` | :dog: |
| `:owl:` | :owl: |
GFM provides really cool formating for tables[2]
Links I used
- I used this for syntax Syntax
- I used this for Ruby code Ruby Example
- I used this for Python code Python Example 4.I used this for Ruby code Ruby Error Example [1]
- Emoji list!
- Format tables [2]