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
| INSTALLED_APPS = [ | |
| 'django.contrib.admin', | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.sessions', | |
| 'django.contrib.messages', | |
| 'django.contrib.staticfiles', | |
| 'projects', | |
| ] |
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
| def introduction_with_language(name, language = "Python"): | |
| print(f"Hi, my name is {name} and I am learning to program in {language}.") | |
| if __name__ == "__main__": | |
| introduction_with_language("Tom", "Ruby") |
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
| def introduction_with_language(name, language = "Python"): | |
| print(f"Hi, my name is {name} and I am learning to program in {language}.") | |
| if __name__ == "__main__": | |
| introduction_with_language("Tom") |
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
| def introduction_with_language(name, language = "Python"): | |
| print(f"Hi, my name is {name} and I am learning to program in {language}.") | |
| if __name__ == "__main__": | |
| introduction_with_language("Tom") |
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
| def introduction_with_language(name, language): | |
| print(f"Hi, my name is {name} and I am learning to program in {language}.") | |
| if __name__ == "__main__": | |
| introduction_with_language("Tom", "Python") |
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
| def print_days(): | |
| days_of_week = ["Mon", "Tues", "Wed", "Thurs", "Fri", "Sat", "Sun"] | |
| for i, d in enumerate(days_of_week): | |
| print(i, d) | |
| if __name__ == "__main__": | |
| print_days() |
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
| days_of_week = ["Mon", "Tues", "Wed", "Thurs", "Fri", "Sat", "Sun"] | |
| first_index = days_of_week[0] | |
| print(first_index) |
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
| days_of_week = ["Mon", "Tues", "Wed", "Thurs", "Fri", "Sat", "Sun"] | |
| days_of_week[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
| def for_loop(): | |
| the_list = [1, 2, 3, 4, 5] | |
| for each_individual_value in the_list: | |
| print(each_individual_value) | |
| if __name__ == "__main__": | |
| for_loop() |
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
| def while_loop(): | |
| x = 0 | |
| while x < 5: | |
| print(x) | |
| x += 1 | |
| if __name__ == "__main__": | |
| while_loop() |