Created
July 2, 2021 21:33
-
-
Save ShyftXero/a0be9a6be948ec1519c8ace5d92caf1f to your computer and use it in GitHub Desktop.
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
# some_bucket = "Eli" | |
# list_of_people = [ some_bucket, "Thomas Jefferson", "wallace and grommit" ] | |
# print(list_of_people) ### puts on screen | |
# list_of_servers = [ | |
# "webserver 1", | |
# "databaseserver 3", | |
# "ftp_server", | |
# "email_server" | |
# ] | |
# print(list_of_servers) ### puts on screen | |
# for server in list_of_servers: | |
# print(server) ### puts on screen | |
# print(server.upper()) | |
list_of_values = ["10", "13", "37", "1337", 0xcafe] | |
# 4 = IV # roman numeral | |
# for val in list_of_values: | |
# print(str(val)) | |
# print(int(val)) | |
# print(hex(int(val))) | |
# print("--------------") | |
# i = 0 | |
# while i < len(list_of_values): | |
# print(list_of_values[i]) | |
# i = i + 1 | |
# print(list_of_values) | |
# if len(list_of_values) < 5: | |
# print("that's a short list") | |
# elif len(list_of_values) >=5 and len(list_of_values) < 10: | |
# print("that's a medium list") | |
# else: | |
# print("that's a long list") | |
# def some_cool_function(): | |
# print(2**16) | |
# some_cool_function() | |
# def some_other_function(): | |
# return 2**8 | |
# print( some_other_function() ) | |
# def say_hello(name): | |
# print("hello", name) | |
# def say_hello_n_times(name, n ): | |
# list_of_numbers = list( range( 0, n ) ) | |
# for number in list_of_numbers: | |
# print('hello', name) | |
# say_hello("Eli") | |
# say_hello_n_times("bob", 5) | |
# def say_hello_default(name, n=1): | |
# list_of_numbers = list( range( 0, n ) ) | |
# for number in list_of_numbers: | |
# print('hello', name) | |
# say_hello_default('charlie') | |
# say_hello_default('charlie', n=2) | |
# name = input("what is your name?") | |
# print("hello" + name) | |
# age = input("what is your age") | |
# print(f"{65 - int(age)} years until retirement." ) | |
eli_dictionary = { | |
"age": 32, | |
"height": 71, | |
"fav_movies": ['hackers', 'men in black', 'titanic'] | |
} | |
print(f'Eli is {eli_dictionary["age"]} years old') | |
print(f'Eli is {eli_dictionary["height"]} inches tall') | |
print(eli_dictionary["fav_movies"]) | |
print('done') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment