Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Print triangle using while loop
Post: RE: Print triangle using while loop

print("Print full Triangle pyramid using stars ") size = 7 m = (2 * size) - 2 for i in range(0, size): for j in range(0, m): print(end=" ") m = m - 1 # decrementing m after each loop ...
sumana Homework 3 4,905 Dec-05-2019, 10:31 AM
  Photo Thread: Menu selection using function
Post: RE: Menu selection using function

def mainMenu(): print("\nExample Menu") print("----------------") print("1) File deletion") print("2) File creation") print("3) Exit\n") selection=int(input("Enter your choice:...
sumana General Coding Help 8 14,644 Dec-05-2019, 05:54 AM
    Thread: Manipulating code to draw a tree
Post: RE: Manipulating code to draw a tree

from turtle import Turtle, mainloop def tree(plist, l, a, f): """ plist is list of pens l is length of branch a is half of the angle between 2 branches f is factor by which branch is s...
sumana Homework 8 3,205 Nov-21-2019, 05:00 PM
    Thread: Menu selection using function
Post: RE: Menu selection using function

def mainMenu(): print("\nExample Menu") print("----------------") print("1) File deletion") print("2) File creation") print("3) Exit\n") selection=int(input("Enter your choice:...
sumana General Coding Help 8 14,644 Nov-21-2019, 04:15 PM
    Thread: Recursion
Post: RE: Recursion

def power(base,exp): if(exp==1): return(base) if(exp!=1): return(base*power(base,exp-1)) base=int(input("Enter base: ")) exp=int(input("Enter exponential value: ")) print("Resu...
sumana General Coding Help 7 2,770 Nov-21-2019, 11:03 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020