<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| def square_root (n,d) | |
| g1 = (n* 1.0) / 2 | |
| g2 = (g1 + (n /g1)) /2 | |
| while (g1 - g2).abs >= d | |
| g1 = g2 | |
| g2 = (g1 + (n / g1)) / 2 | |
| end | |
| g2 | |
| end |
| # Determine if a number is a prime number | |
| def square_root(n,d) | |
| g1 = (n * 1.0) / 2 | |
| g2 = (g1 + (n / g1)) / 2 | |
| while (g1 - g2).abs >= d | |
| g1 = g2 | |
| g2 = (g1 + (n / g1)) / 2 | |
| end | |
| g2 | |
| end |
| # Class activity 1 | |
| def list_range(list_): | |
| if len(list_) == 1: | |
| return [list_[0]] | |
| smallest = list_[0] | |
| largest = list_[0] | |
| for item in list_: | |
| if item > largest: | |
| largest = item | |
| elif item < smallest: |
| def earliest_letter word | |
| #word = word.downcase | |
| earliest = word[0] | |
| word.split('').each do |letter| | |
| if letter < earliest | |
| earliest = letter | |
| end | |
| end | |
| earliest | |
| end |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Address Book</title> | |
| <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
| <style type="text/css"> | |
| button{margin: 0 20px;} | |
| </style> | |
| </head> | |
| <body> |
| .container { | |
| text-align: center; | |
| padding: 1.5em 0; | |
| } | |
| img { | |
| width: 40%; | |
| height: auto; | |
| } |
| [ | |
| { | |
| _id: '59ed1ed9be3ee700123e4e4a', | |
| title: 'shoes', | |
| status: 'Active', | |
| __v: 0, | |
| }, | |
| { | |
| _id: '59ed1ee7be3ee700123e4e4b', | |
| title: 'casual', |
| const productQuickreplies = (products, sliceSet, beginSlice, endSlice) => { | |
| // slice the elements of the array to the desired set size | |
| let slicedProducts = products.slice(beginSlice, endSlice); | |
| // form an array of quick replies with title and payload | |
| let quickReplies = slicedProducts.map(product => { | |
| return { | |
| "content_type": "text", | |
| "title": product.title, |