a> 30f7226d9a first commit 2 年之前 tailwind-color-palette 30f7226d9a first commit 2 年之前 tailwindcss 30f7226d9a first commit 2 年之前 thenify 30f7226d9a first commit 2 年之前 thenify-all 30f7226d9a first commit 2 年之前 to-regex-range 30f7226d9a first commit 2 年之前 tr46 30f7226d9a first commit 2 年之前 ts-interface-checker 30f7226d9a first commit 2 年之前 uglify-js 30f7226d9a first commit 2 年之前 underscore 30f7226d9a first commit 2 年之前 upper-case 30f7226d9a first commit 2 年之前 util-deprecate 30f7226d9a first commit 2 年之前 valid-data-url 30f7226d9a first commit 2 年之前 web-resource-inliner 30f7226d9a first commit 2 年之前 webidl-conversions 30f7226d9a first commit 2 年之前 whatwg-url 30f7226d9a first commit 2 年之前 wrap-ansi 30f7226d9a first commit 2 年之前 wrappy 30f7226d9a first commit 2 年之前 y18n 30f7226d9a first commit 2 年之前 yallist 30f7226d9a first commit 2 年之前 yaml 30f7226d9a first commit 2 年之前 yargs 30f7226d9a first commit 2 年之前 yargs-parser 30f7226d9a first commit 2 年之前 .yarn-integrity 30f7226d9a first commit 2 年之前 tum/pythonlearning - Gogs: Simplico Git Service

Nav apraksta

aliens.py 589B

1234567891011121314151617181920212223
  1. # Make an empty list for storing aliens.
  2. aliens = []
  3. # Make 30 green aliens.
  4. for alien_number in range (0,30):
  5. new_alien = {'color': 'green', 'points': 5, 'speed': 'slow'}
  6. aliens.append(new_alien)
  7. for alien in aliens[0:3]:
  8. if alien['color'] == 'green':
  9. alien['color'] = 'yellow'
  10. alien['speed'] = 'medium'
  11. alien['points'] = 10
  12. elif alien['color'] == 'yellow':
  13. alien['color'] = 'red'
  14. alien['speed'] = 'fast'
  15. alien['points'] = 15
  16. # Show the first 5 aliens:
  17. for alien in aliens[0:5]:
  18. print(alien)
  19. print("...")