Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
Member Avatar for pythonnewbie10

[code=php]'''process a file of students''' def main(): f = open( "Ex9_2010_input.txt", "r") line = f.readline() while len(line) != 0: print line line = f.readline() main() [/code] In this case, the file contains comma separated values, each line representing student names and assessment marks in this format: FirstName, LastName, Asg1Mark, Asg2Mark, …

Member Avatar for TrustyTony
0
108
Member Avatar for pythonnewbie10

The Question below has been given to me: An internet shop requires an order tracking system. When someone buys an item online, an Order is created. However, orders are not sourced and processed until payment has been confirmed. Once the order has been processed it can be shipped. The order …

Member Avatar for snippsat
0
295
Member Avatar for pythonnewbie10

There exists a file of ‘Knock Knock’ jokes. The file consists of line pairs. The first element of each pair contains the setup line, and the second element contains the punch line. Here are a few lines from the file: Amish Amish you when you are away. Snow Snowbody but …

Member Avatar for TrustyTony
0
168
Member Avatar for pythonnewbie10

Any help with the question or how to approach this would be fantastic The following is a dump of a TCP header in hexadecimal format: 00CD0018 00000EF1 00000D5D 502200D1 01BF0010 Please answer the following two parts of questions: 2.1 What is the source port number? 2.2 What is the destination …

Member Avatar for cguan_77
0
102
Member Avatar for pythonnewbie10

[code=syntax] '''calculate the future value of an investment after 10 years''' def calcValue( initialValue, interestRate ): period = 10 investmentValue = initialValue for i in range(period): investmentValue = investmentValue * ( 1 + interestRate ) return investmentValue def main(): principal = int(raw_input("Enter initial investment amount: ")) interest = float(raw_input("Enter interest …

Member Avatar for TrustyTony
0
71
Member Avatar for pythonnewbie10

[code=syntax] from random import randint def menu(): while True: print """ \n\n\n\n\n\n\n ____ ___ ____ _ __ ____ _ ____ _____ ____ | _ \ / _ \ / ___| |/ / | _ \ / \ | _ \| ____| _ \ | |_) | | | | | …

Member Avatar for TrustyTony
0
177
Member Avatar for pythonnewbie10

I have this program that i have been working on which plays rock paper scissors game with the user. [code=syntax] '''play a game of Rock, Paper, Scissors''' from random import randint def firstChooserWins( chooserChoice, otherChoice ): #print chooserChoice, otherChoice if (chooserChoice == "Rock" and otherChoice == "Scissors") or \ (chooserChoice …

Member Avatar for TrustyTony
0
141
Member Avatar for pythonnewbie10

[code=syntax] import random def main(max): print "\tWelcome to 'Guess my number'!" print "\nI'm thinking of a number between 1 and 100." bestoutof = raw_input("Best out of : ") num = random.randrange(101) tries = bestoutof guess = "" while guess != num: guess = int(raw_input("Take a guess: ")) if guess > …

Member Avatar for woooee
0
143