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>Proto2.1 Uncommanded Analysis — Software & Vehicle Breakdown</title> | |
| <script>/* Chart.js 4.4.7 inlined for offline/proxy hosting */ | |
| /** | |
| * Skipped minification because the original files appears to be already minified. | |
| * Original file: /npm/chart.js@4.4.7/dist/chart.umd.js |
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
| d = { | |
| 'Sam': 7, | |
| 'rolls': ['rock', 'paper', 'scissors'], | |
| 'done': 'True', | |
| } | |
| print(d["Sam"]) # outputs 7 | |
| print(d['rolls']) # outputs ['rock', 'paper', 'scissors'] | |
| print(d.get('Sarah')) # outputs None | |
| print(d.get('Jeff', -1)) # outputs -1 | |
| print(d['done']) # outputs 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
| import random | |
| def sign(): | |
| print("Hello world!") | |
| def amount(): | |
| mm_count = random.randint(1, 100) | |
| return mm_count | |
| def main(): |
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
| # 1.Create a hello_world.py file and execute it with Python. This can be in PyCharm or in another editor and using the technique above. Seems trivial but will help you verify everything is working right there. Just have the program output "Hello world" | |
| print('Hello World!') | |
| # 2.Write a program that requests a number from the user. Have the program print "Even" or "Odd" depending on whether they entered an even or odd number. | |
| no_guess = input('Pick a number? ') | |
| no = int(no_guess) | |
| while no != 0: | |
| remainder = no % 2 # Is this 0 or 1? | |
| if remainder == 0: |
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
| >>> x = 5 | |
| >>> x** | |
| File "<stdin>", line 1 | |
| x** | |
| SyntaxError: invalid syntax | |
| >>> x**2 | |
| 25 | |
| >>> name = input("What is your name?") | |
| What is your name? Simon |