Hello there dear community,
ive been tinkering with some "for loops" and "functions" lately. Here is my code and result:
What i want to do with this code is having the following result:
Hello1 Bye1
Hello2 Bye1
Hello3 Bye1
Hello4 Bye1
for that i want to edit the area "#edit should happen here". I also want to do some variations with only printing "Bye2" for example.
how would i do this code as an extension?
Hello1 Bye1
Hello2 Bye1
Hello3 Bye1
Hello4 Bye1
Thanks for all the quick responses so far. I realy love writing my questions here because the answers are always quick and informative :)
Kind regards
Zentu
ive been tinkering with some "for loops" and "functions" lately. Here is my code and result:
#no edit wanted def function_1(): return "Hello1", "Hello2", "Hello3", "Hello4" def function_2(): return "Bye1", "Bye2", "Bye3", "Bye4" #edit should happen here for x in function_1(): for y in function_2(): print(x , y)---- RESULT ----
Output:Hello1 Bye1
Hello1 Bye2
Hello1 Bye3
Hello1 Bye4
Hello2 Bye1
Hello2 Bye2
Hello2 Bye3
Hello2 Bye4
Hello3 Bye1
Hello3 Bye2
Hello3 Bye3
Hello3 Bye4
Hello4 Bye1
Hello4 Bye2
Hello4 Bye3
Hello4 Bye4
The goal of tinkereing with this code for me is to practise fracturing my code into different functions as ive read this is very usefull for later very long codes.What i want to do with this code is having the following result:
Hello1 Bye1
Hello2 Bye1
Hello3 Bye1
Hello4 Bye1
for that i want to edit the area "#edit should happen here". I also want to do some variations with only printing "Bye2" for example.
how would i do this code as an extension?
Hello1 Bye1
Hello2 Bye1
Hello3 Bye1
Hello4 Bye1
Thanks for all the quick responses so far. I realy love writing my questions here because the answers are always quick and informative :)
Kind regards
Zentu