Update snippet titles

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-02-13 14:06:41 +02:00
parent e62b22659d
commit 18a8c6cfbc
24 changed files with 28 additions and 28 deletions

View File

@ -1,14 +1,14 @@
---
title: geometric_progression
title: Geometric progression
tags: math,list,intermediate
firstSeen: 2020-10-04T12:19:28+03:00
lastUpdated: 2020-11-02T19:28:05+02:00
---
Initializes a list containing the numbers in the specified range where `start` and `end` are inclusive and the ratio between two terms is `step`.
Returns an error if `step` equals `1`.
- Use `range()`, `math.log()` and `math.floor()` and a list comprehension to create a list of the appropriate length, applying the step for each element.
- Returns an error if `step` equals `1`.
- Omit the second argument, `start`, to use a default value of `1`.
- Omit the third argument, `step`, to use a default value of `2`.