Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,157,900 members, 7,834,998 topics. Date: Tuesday, 21 May 2024 at 12:25 AM

Eazyd's Posts

Nairaland Forum / Eazyd's Profile / Eazyd's Posts

(1) (2) (3) (4) (5) (of 5 pages)

Programming / Re: Design A Module Program by eazyd(m): 4:55pm On Feb 17, 2012
Thanks! show your python result too. Once i confirm where my mistake is,i will do another program and let u check for me. Thanks for your help.
Programming / Re: Design A Module Program by eazyd(m): 2:49pm On Feb 17, 2012
@goon,can you do this in python 2 pls.
Programming / Re: Design A Module Program by eazyd(m): 2:30pm On Feb 17, 2012
@goon i use a book called Programming Logic & Design by Tony Gaddis. Thanks for the simple module. i use python 2.
Programming / Re: Creating Multiple Columns In The Db by eazyd(m): 8:48pm On Feb 16, 2012
I guess you using access which is easy to create rows and columns, state your DBMS and you will get help!
Programming / Re: Project Topics Tips For Computer Science Undergraduates by eazyd(m): 8:38pm On Feb 16, 2012
hi sweet-pawn!

please i need help on my python program- i wrote the program but i keep getting errors can u pls run it and tell me what to do. here's the program

There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Design a module program that asks how many tickets for each class of seats were sold, and then displays the amount of income generated from ticket sales.


# This program calculates the income generated from ticket sales
# Class A seats cost $15, Class B seats cost $12, Class C seats cost $9
# mainline logic
def main():
intro() # call the intro function
readInput() # call readInput function


# This function displays some introductory messages
def intro():
print("Welcome to the Ticket Sales Program"wink
print("Class A seats cost $15"wink
print("Class B seats cost $12"wink
print("Class C seats cost $9"wink
print("You will be asked to enter the number of tickets sold in each of the three categories"wink
print("The program will then calculate the income generated from all the sales"wink
print()
raw_input("Press any Key when you are ready to begin"wink

# This programs reads the readInput function
def readInput():
numClassA =
numClassB =
numClassC =


# This function calculates the sales from the three categories
def calcSales(numClassA, numClassB, numClassC):
salesClassA = numClassA * 15
salesClassB = numClassB * 12
salesClassC = numClassC * 9
print("The income generated for Class A seats: $%7.2f"wink % salesClassA
print("The income generated for Class B seats: $%7.2f"wink % salesClassB
print("The income generated for Class C seats: $%7.2f"wink % salesClassC
totalSales(totalSales)

# This function outputs the income generated
def outputSales(Sales):
print("\nThe total income generated for the softball game is $%7.2f"wink % sales

# call the main function
main()
Programming / Re: Design A Module Program by eazyd(m): 12:50pm On Feb 16, 2012
I did call the function and passed a value to it- i use Programming Logic & Design by Tony Gaddis! can you just show me some workings,i learn from examples, i have written some programs but this tend to somehow confuse me and i know its just a lil error from me but i can't see m to figure it out dats why i need help. If i get it,i know for a fact that mistake will never be made again, i read your posts and you are an expert in python. if you got time to re design this program and i will compare and contrast with what i did.That way i know what to do next time.
Programming / Re: Design A Module Program by eazyd(m): 10:41pm On Feb 15, 2012
@DonSegmond

do i call this function with 0 since at this point they have no value.


how do i call this function?
Programming / Re: Design A Module Program by eazyd(m): 9:38pm On Feb 15, 2012
i just defined it-

def readInput():
numClassA = 15
numClassB = 12
numClassC = 9

does the program makes sense to you when you ran it? i did run it but it didn't calculate the total sales!
Programming / Re: Design A Module Program by eazyd(m): 9:13pm On Feb 15, 2012
my outcome was an error (NameError: global name 'readInput' is not defined) and i thought i'd find help here, where all dis programmers na??  dis should be quite easy for a guru! me just start yesterday sad
Programming / Re: Design A Module Program by eazyd(m): 11:37am On Feb 15, 2012
This is “my program”
# This program calculates the income generated from ticket sales
# Class A seats cost $15, Class B seats cost $12, Class C seats cost $9
# mainline logic
def main():
intro() # call the intro function
readInput() # call readInput function
# This function displays some introductory messages
def intro():
print("\tWelcome to the Ticket Sales Program"wink
print("\tClass A seats cost $15"wink
print("\tClass B seats cost $12"wink
print("\tClass C seats cost $9"wink
print("\tYou will be asked to enter the number of tickets sold in each of the three categories"wink
print("\tThe program will then calculate the income generated from all the sales"wink
print()
raw_input("Press any Key when you are ready to begin"wink


# This function calculates the sales from the three categories
def calcSales(numClassA, numClassB, numClassC):
salesClassA = numClassA * 15
salesClassB = numClassB * 12
salesClassC = numClassC * 9
print("The income generated for Class A seats: $%7.2f"wink % salesClassA
print("The income generated for Class B seats: $%7.2f"wink % salesClassB
print("The income generated for Class C seats: $%7.2f"wink % salesClassC
totalSales(totalSales)

# This function outputs the income generated
def outputSales(Sales):
print("\nThe total income generated for the softball game is $%7.2f"wink % sales

# call the main function
main()
Programming / Re: Design A Module Program by eazyd(m): 11:15am On Feb 15, 2012
My home work is done,just want to compare and contrast! I can post what i did if someone can do it too- thats how we learn!
Programming / Design A Module Program by eazyd(m): 7:05pm On Feb 14, 2012
Can someone help design this module program for python.

There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Design a module program that asks how many tickets for each class of seats were sold, and then displays the amount of income generated from ticket sales.

Thanks!

(1) (2) (3) (4) (5) (of 5 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 18
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.