Created
March 14, 2024 02:06
-
-
Save nax3t/c5f4a84184c37351f267e3bb5d8e785a to your computer and use it in GitHub Desktop.
Source code from Web Dev FUNdamentals Ep. 5
This file contains 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
dict = {"a": 0, "b": 2, "c": 3} | |
def print_dict(d): | |
for key in d: | |
print(d[key]) | |
return d | |
new_dict = print_dict(dict) | |
print_dict(new_dict) | |
def print_all_pokemon(*pokes): | |
for poke in pokes: | |
print(poke) | |
print_all_pokemon("Bulbasaur", "Squirtle", "Charmander", "Pikachu") | |
def print_pokes_list(poke_list): | |
for poke in poke_list: | |
print(poke) | |
print_pokes_list(["Bulbasaur", "Squirtle", "Charmander", "Pikachu"]) | |
def print_pokes(poke1, poke2="Ratatta", poke3="Pidgey"): | |
print("1st Poke: "+poke1) | |
print("2nd Poke: "+poke2) | |
print("3rd Poke: "+poke3) | |
print_pokes("Bulbasaur", "Squirtle", "Charmander") | |
print_pokes(poke1="Abra") | |
def print_pokemon(pokemon="Lickitung"): | |
print("My favorite Pokemon is: "+pokemon) | |
print_pokemon() | |
a = 32 | |
def print_func(p): | |
print(p) | |
p = 100 | |
return p | |
b = print_func(a) | |
print(b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment