4 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for DragonMastur

karmstrong ask in the Python chat if any one was farmilar with converting a for loop in C to Python. Here is a program in python that will do it for you! Thank You!

Member Avatar for vegaseat
0
806
Member Avatar for Szabi Zsoldos

**This is intented for learning purposes, feel free to study the code** Create a drawing that looks like this (pyramid) The number should be incremented with the modulus.

Member Avatar for Szabi Zsoldos
-1
518
Member Avatar for TrustyTony

Here is exercise in error handling, while looping and for looping with itertools.chain. It is also exercise of functions not letting user to go without giving proper input. I call them to myself 'jail functions'. Here you could add as an exercise breaking out of loop and continuing until user …

Member Avatar for farmwife
0
1K
Member Avatar for Purkinje

[url=http://www.daniweb.com/software-development/python/threads/375271/1621485#post1621485]Sample code credited to Enalicho[/url] In this example, we count the number of appearances of the number 1 through a range of pages using while loops. First off, notice how easy it is to tell what the variables in this method are doing. I did not write this method, but …

0
183

The End.