Login
Sign Up


You are using the mobile version of the forum, some features have been disabled to have it responsive.
Limelight Reunion 2024 - v4b1Limelight Discord
Ares Defence Services Discord
Limelight Reunion 2024 - v4b1Limelight DiscordAres Defence Services Discord

receiptDevelopment Blog:

Development Contributor Workflow

receiptHR Blog:

What *are* they doing over there?

receiptTeacher Blog:

Insight into the Teacher Team

receiptDevelopment Blog:

Infrastructure Upgrade 11/2019

receiptDevelopment Blog:

how suggestions???

receiptDevelopment Blog:

Planning for the future.


This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Python - Resolved
Nev radio_button_checked
Real Estate Developer // Architect
Veteran Member
Posts: 1,071
Threads: 180
Likes Given: 217
Likes Recieved: 1527 in 599 posts
Joined: Aug 2015
Reputation: 14
#1
Apr 16, 2016, 06:43 PM
Hey guys,

My sister is having an issue with a piece of code that is coded in Python. 
If you can solve the issue, compensation of $500,000 in-game currency will be given to you. 

Deadline: Today, 4PM Pacific Standard Time - 6 Hours 

More information available here: https://stackoverflow.com/questions/3666...-pig-latin

(This post was last modified: Apr 17, 2016, 02:23 AM by Nev. Edited 2 times in total.)
PaulB radio_button_checked
Developer
Veteran Member
Posts: 856
Threads: 62
Likes Given: 471
Likes Recieved: 519 in 277 posts
Joined: Aug 2015
Reputation: 14
#2
Apr 16, 2016, 07:51 PM
Mind printing after you enter the file path? Just want to check something, aswell as showing us what is currently in the output file.
[Image: sigs.php?steamid=STEAM_0:0:81010017&t=2]
(This post was last modified: Apr 16, 2016, 07:55 PM by PaulB.)
Nev radio_button_checked
Real Estate Developer // Architect
Veteran Member
Posts: 1,071
Threads: 180
Likes Given: 217
Likes Recieved: 1527 in 599 posts
Joined: Aug 2015
Reputation: 14
#3
Apr 16, 2016, 08:03 PM
Text before - https://textuploader.com/5y011
Text after - https://textuploader.com/5y01f
The following 1 user Likes Nev's post:
  • PaulB
PaulB radio_button_checked
Developer
Veteran Member
Posts: 856
Threads: 62
Likes Given: 471
Likes Recieved: 519 in 277 posts
Joined: Aug 2015
Reputation: 14
#4
Apr 16, 2016, 08:14 PM
and mind pastebin, the full code?
P.s
You've got the code correct, but you arn't splitting the lines into single words. But I can't see what is happening untill the full code is released
[Image: sigs.php?steamid=STEAM_0:0:81010017&t=2]
(This post was last modified: Apr 16, 2016, 08:34 PM by PaulB.)
Nev radio_button_checked
Real Estate Developer // Architect
Veteran Member
Posts: 1,071
Threads: 180
Likes Given: 217
Likes Recieved: 1527 in 599 posts
Joined: Aug 2015
Reputation: 14
#5
Apr 16, 2016, 08:48 PM
That is her full code lol, whatever is on the stackoverflow link
Nev radio_button_checked
Real Estate Developer // Architect
Veteran Member
Posts: 1,071
Threads: 180
Likes Given: 217
Likes Recieved: 1527 in 599 posts
Joined: Aug 2015
Reputation: 14
#6
Apr 16, 2016, 08:50 PM
Theres only 3 functions atm

Just has to be able to 1. Translate a text file into pig latin and have a line and word count.
Nev radio_button_checked
Real Estate Developer // Architect
Veteran Member
Posts: 1,071
Threads: 180
Likes Given: 217
Likes Recieved: 1527 in 599 posts
Joined: Aug 2015
Reputation: 14
#7
Apr 16, 2016, 08:51 PM
If it helps all her teacher suggested was that instead of using .read() use a "for" loop to iterate through the file
Taylor radio_button_checked
"You are not torturing people in your office"
Contributor
Posts: 3,088
Threads: 177
Likes Given: 2625
Likes Recieved: 1972 in 1215 posts
Joined: Aug 2015
Reputation: 40
#8
Apr 16, 2016, 08:53 PM
I thought this was a PR at first before I read the actul post ;-; :c
[Image: 800px-PWRR_Tiger.svg.png]
Have I helped you out? Leave a rep!
The following 2 users Like Taylor's post:
  • George, Raptor
PaulB radio_button_checked
Developer
Veteran Member
Posts: 856
Threads: 62
Likes Given: 471
Likes Recieved: 519 in 277 posts
Joined: Aug 2015
Reputation: 14
#9
Apr 16, 2016, 09:10 PM
Okay. I think I've got it. Tell me if it works as currently away at a mini-holiday working on a online python editor.
https://pastebin.com/Lp2ma7rd
After testing it further, found out that it'll only work for one line at a time. Just changing it around now to accept multiple lines,
[Image: sigs.php?steamid=STEAM_0:0:81010017&t=2]
(This post was last modified: Apr 16, 2016, 09:15 PM by PaulB. Edited 1 time in total.)
Nev radio_button_checked
Real Estate Developer // Architect
Veteran Member
Posts: 1,071
Threads: 180
Likes Given: 217
Likes Recieved: 1527 in 599 posts
Joined: Aug 2015
Reputation: 14
#10
Apr 16, 2016, 09:25 PM
Cool man thanks I'll test out a finished code when I get back to my hotel
PaulB radio_button_checked
Developer
Veteran Member
Posts: 856
Threads: 62
Likes Given: 471
Likes Recieved: 519 in 277 posts
Joined: Aug 2015
Reputation: 14
#11
Apr 16, 2016, 10:11 PM
Hmm. Having trouble accepting multiple lines at a time. For now if you can just put all the code in one line for example:
This is some test code that will convert into pig latin and I like etc
rather than
This is some test code that will convert
into pig latin
As that will break code ^^.
[Image: sigs.php?steamid=STEAM_0:0:81010017&t=2]
Nev radio_button_checked
Real Estate Developer // Architect
Veteran Member
Posts: 1,071
Threads: 180
Likes Given: 217
Likes Recieved: 1527 in 599 posts
Joined: Aug 2015
Reputation: 14
#12
Apr 16, 2016, 10:41 PM
Burnett figured it out but thanks for trying!
Faustie radio_button_checked
Veteran
Veteran Member
Posts: 3,039
Threads: 305
Likes Given: 1050
Likes Recieved: 2419 in 844 posts
Joined: Aug 2015
Reputation: 25
#13
Apr 17, 2016, 09:44 PM
Burnett is honestly such a machine. With the exception of maybe fortran or matlab I could give him any coding language I can think of and he'd know some of it, if not loads of it.
The following 3 users Like Faustie's post:
  • Bambo, PaulB, Project
George radio_button_checked
Actively inactive
Veteran Member
Posts: 1,261
Threads: 28
Likes Given: 716
Likes Recieved: 1433 in 530 posts
Joined: Aug 2015
Reputation: 20
#14
Apr 17, 2016, 09:49 PM
(Apr 17, 2016, 09:44 PM)Faustie Wrote: Burnett is honestly such a machine. With the exception of maybe fortran or matlab I could give him any coding language I can think of and he'd know some of it, if not loads of it.

I'm fairly sure he doesn't sleep, he just powers down.
[Image: olA44b8.png]
(This post was last modified: Apr 17, 2016, 10:11 PM by George.)
The following 4 users Like George's post:
  • Bambo, Brax, Nudel, PaulB
Brax radio_button_checked
Former Teacher & Contributor
Membership
Posts: 823
Threads: 33
Likes Given: 563
Likes Recieved: 452 in 315 posts
Joined: Aug 2015
Reputation: 14
#15
Apr 18, 2016, 01:32 AM
Burnett's server computer of a brain is hosted at Area 51.
[Image: 8UKYGXX.png]
The following 2 users Like Brax's post:
  • Dick, Nudel




Users browsing this thread: