(event, context)
| 9 | |
| 10 | |
| 11 | def lucky_number(event, context): |
| 12 | print(event) |
| 13 | upperLimitDict = event['request']['intent']['slots']['UpperLimit'] |
| 14 | upperLimit = None |
| 15 | if 'value' in upperLimitDict: |
| 16 | upperLimit = parseInt(upperLimitDict['value']) |
| 17 | else: |
| 18 | upperLimit = 100 |
| 19 | |
| 20 | number = random.randint(0, upperLimit) |
| 21 | response = { |
| 22 | 'version': '1.0', |
| 23 | 'response': { |
| 24 | 'outputSpeech': { |
| 25 | 'type': 'PlainText', |
| 26 | 'text': 'Your lucky number is ' + str(number), |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | return response |
nothing calls this directly
no test coverage detected