Title: Facing Problem in Executing Rock , papers , scissors game . need help in python · Issue #11 · realpython/python-speech-recognition · GitHub
Open Graph Title: Facing Problem in Executing Rock , papers , scissors game . need help in python · Issue #11 · realpython/python-speech-recognition
X Title: Facing Problem in Executing Rock , papers , scissors game . need help in python · Issue #11 · realpython/python-speech-recognition
Description: ` '''This code is not giving error but i dont know why the "comp" value is always none. its not changing even through random module and its functions . please help me ''' import random def game(comp , player): if player == comp: return N...
Open Graph Description: ` '''This code is not giving error but i dont know why the "comp" value is always none. its not changing even through random module and its functions . please help me ''' import random def game(com...
X Description: ` '''This code is not giving error but i dont know why the "comp" value is always none. its not changing even through random module and its functions . please help me '...
Opengraph URL: https://github.com/realpython/python-speech-recognition/issues/11
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Facing Problem in Executing Rock , papers , scissors game . need help in python","articleBody":"`\r\n'''This code is not giving error but i dont know why the \"comp\" value is always none. its not changing even through random module and its functions . please help me\r\n'''\r\nimport random\r\n\r\ndef game(comp , player):\r\n if player == comp:\r\n return None\r\n elif comp == \"r\":\r\n if player == \"s\":\r\n return False\r\n elif player == \"p\":\r\n return True \r\n elif comp == \"s\":\r\n if player == \"p\":\r\n return False\r\n elif player == \"r\":\r\n return True \r\n elif comp == \"p\":\r\n if player == \"r\":\r\n return False\r\n elif player == \"s\":\r\n return True \r\n\r\ncomp = print(\"Comp Turn: Rock , Papers, Scissors: \")\r\nrandNo = random.randint(1 , 3)\r\nif randNo == 1:\r\n comp == \"r\"\r\nelif randNo == 2:\r\n comp == \"p\"\r\nelif randNo == 3:\r\n comp == \"s\"\r\n\r\n\r\n\r\nplayer = input(\"Your Turn: Rock(r) , Papers(p) , Scissors(s) : \")\r\n\r\nresult = game( comp , player)\r\n\r\nprint(\"Computer chose\" , comp)\r\nprint(\"You chose`\" , player)\r\n\r\n\r\nif result == None:\r\n print(\"The game is tied\")\r\nelif result:\r\n print(\"You Won\")\r\nelse:\r\n print(\"You Lose\")\r\n\r\n'''\r\nthe \"comp\" value is showing none type, i want it to be str. i tried converting it but it not worked plzzz help masters. anyone professional here to help`'''","author":{"url":"https://github.com/Laksh-Devloper","@type":"Person","name":"Laksh-Devloper"},"datePublished":"2020-10-16T11:20:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/11/python-speech-recognition/issues/11"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1373d599-884d-404b-1a8c-a79ba70f43ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B2E:1E0146:164A5AD:1DE3C3F:6969A6AA |
| html-safe-nonce | ea75a307bd00d4085175ce737a01cb37c881eca54bd3e1f4a6b59e8c41cf83ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjJFOjFFMDE0NjoxNjRBNUFEOjFERTNDM0Y6Njk2OUE2QUEiLCJ2aXNpdG9yX2lkIjoiODI3MTk5MTA3OTgxMjMxMDY5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3042d9feb1a9d752f24151db63481b4f19ad4aaa66a5ca46759b517f56c25858 |
| hovercard-subject-tag | issue:723132482 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/realpython/python-speech-recognition/11/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7e5ed05c679d30f954bcb0e60be40bfd91a5d1f22201be2f828913653cafc5c5/realpython/python-speech-recognition/issues/11 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7e5ed05c679d30f954bcb0e60be40bfd91a5d1f22201be2f828913653cafc5c5/realpython/python-speech-recognition/issues/11 |
| og:image:alt | ` '''This code is not giving error but i dont know why the "comp" value is always none. its not changing even through random module and its functions . please help me ''' import random def game(com... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Laksh-Devloper |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24c4c97a2d520cb286b35e1a4c22d7a4df3c26a2fa28dd7cdf0e65db327b4de7 |
| turbo-cache-control | no-preview |
| go-import | github.com/realpython/python-speech-recognition git https://github.com/realpython/python-speech-recognition.git |
| octolytics-dimension-user_id | 5448020 |
| octolytics-dimension-user_login | realpython |
| octolytics-dimension-repository_id | 125435050 |
| octolytics-dimension-repository_nwo | realpython/python-speech-recognition |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 125435050 |
| octolytics-dimension-repository_network_root_nwo | realpython/python-speech-recognition |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 124667f43168afb6c9c03b7c02eb5b1d2e1be3d9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width