Here we defined a function which will help to write the even numbers till the n value.
n is the number we're gonna take from the user hence we used the input function.
Also, inorder to print odd numbers - entire code will remain the same except below
if i !=0:
odd_numbers.append(i)
Thanks for watching, please subscribe.
In questa pagina del sito puoi guardare il video online How to print even numbers till 'n' value using python || easy python code della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Write to Learn 24 giugno 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 15 volte e gli è piaciuto 0 spettatori. Buona visione!