@app.route('/api/v1/users/<user_id>')
def handler(user_id):
# route handler
# use user_id
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Esther Njeri Kanini Portfolio | HOME</title> | |
</head> | |
<body> | |
<nav> | |
<div class="logo"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_age = 14 | |
class(my_age) | |
my_weight = 90.6 | |
class(my_weight) | |
my_name = "Victor" #Note how the quotation marks on the right indicate that "Victor" is a character | |
class(my_name) | |
is_teenager = TRUE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My year of Birth | |
year_of_birth = 2001 | |
# The Current Year | |
current_year = 2020 | |
# Calculating my age by subtracting year_of_birth from the current_year | |
age = current_year - year_of_birth | |
age |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
year_of_birth = 2001 | |
current_year = 2020 | |
age = current_year - year_of_birth | |
age |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Arithmetic | Operator Function | Description | Example | Output | |
---|---|---|---|---|---|
+ | Addition | adds a number to another number | 3+2 | [1] 5 | |
- | Subtraction | subtracts a number from another number | 3 - 2 | [1] 1 | |
* | Multiplication | multiplies number with another number | 3 * 2 | [1] 6 | |
/ | Division | splits a number into equal parts | 3/2 | [1] 1.5 | |
^ | Exponentiation | raising a number to the power of another number | 3 ** 2 | [1] 9 | |
%% | Modulo | returns the remainder of the division | 3 %% 2 | [1] 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
age <- 17 | |
age |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Hello, World!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import africastalking | |
username = "africa username" # use 'sandbox' for development in the test environment | |
# use your sandbox app API key for development in the test environment | |
api_key = "africa's talking api key" | |
africastalking.initialize(username, api_key) | |
# # Use the service synchronously |
NewerOlder