Turn on thread page Beta
    Offline

    1
    ReputationRep:
    I'm having a hard time trying to figure out 5-4! Any tips? (for some reason cat won't work as a command)
    Offline

    1
    ReputationRep:
    I'm on level 5 challenge 1 of the moon base, level 4 of hq and stuck on both. Help would be appreciated, and I'd be willing to help anyone who needs it on earlier ones if they want

    At the moment, on moonbase 5-1, I'm getting 'contents were not as expected' when i try to write to the file. Anyone know what I'm doing wrong?
    • Thread Starter
    Offline

    12
    ReputationRep:
    (Original post by Onnadhiel)
    I'm on level 5 challenge 1 of the moon base, level 4 of hq and stuck on both. Help would be appreciated, and I'd be willing to help anyone who needs it on earlier ones if they want

    At the moment, on moonbase 5-1, I'm getting 'contents were not as expected' when i try to write to the file. Anyone know what I'm doing wrong?
    Sorry, no idea. Maybe screenshot your code and see?
    Posted on the TSR App. Download from Apple or Google Play
    Offline

    1
    ReputationRep:
    (Original post by AnaaaElec)
    Sorry, no idea. Maybe screenshot your code and see?
    Name:  challenge 5-1 code.png
Views: 85
Size:  62.4 KB The output I'm getting when I run it is just 'Contents were not as expected'. I've tried changing the 'listen' value, writing it as if serversocket.recv() == True: and data = serversocket.recv() , file.write(data), but nothing's working.
    • Thread Starter
    Offline

    12
    ReputationRep:
    (Original post by Onnadhiel)
    Name:  challenge 5-1 code.png
Views: 85
Size:  62.4 KB The output I'm getting when I run it is just 'Contents were not as expected'. I've tried changing the 'listen' value, writing it as if serversocket.recv() == True: and data = serversocket.recv() , file.write(data), but nothing's working.
    Try using the ‘with open’ function jnstead of file = open(file.txt,w+)
    Posted on the TSR App. Download from Apple or Google Play
    Offline

    1
    ReputationRep:
    (Original post by AnaaaElec)
    Try using the ‘with open’ function jnstead of file = open(file.txt,w+)
    No, I'm still getting the same output
    Offline

    1
    ReputationRep:
    Is anyone else struggling on the javascript one? Level 4 C5. Cant get passed it
    Offline

    6
    ReputationRep:
    (Original post by Onnadhiel)
    Name:  challenge 5-1 code.png
Views: 85
Size:  62.4 KB The output I'm getting when I run it is just 'Contents were not as expected'. I've tried changing the 'listen' value, writing it as if serversocket.recv() == True: and data = serversocket.recv() , file.write(data), but nothing's working.
    Doubt this will solve it but the max value you can have in "listen()" is 10, so you need to change that 100 to 10
    Offline

    1
    ReputationRep:
    (Original post by Jamiewinter)
    Doubt this will solve it but the max value you can have in "listen()" is 10, so you need to change that 100 to 10
    No, it didn't solve it, but thanks for the tip, might need it later on
    Offline

    6
    ReputationRep:
    Spoiler:
    Show


    This is my response to moon base 5 lvl 1. Don't copy it necessarily but take look at it and see where it differs to yours. In your program, you only look for a response once, whereas in mine, I look for a response until I receive one by putting it in a loop. Ignore line 17 as it is unecessary

    Attached Images
     
    Offline

    1
    ReputationRep:
    (Original post by Jamiewinter)
    Spoiler:
    Show



    This is my response to moon base 5 lvl 1. Don't copy it necessarily but take look at it and see where it differs to yours. In your program, you only look for a response once, whereas in mine, I look for a response until I receive one by putting it in a loop. Ignore line 17 as it is unecessary


    Thanks for the help. I didn't copy any of it, but it was helpful. Apparently some of why it wasn't working was me not having indented it enough times (not sure why, but it only worked when I'd pressed 'tab' three times, but I'm not going to question it)
    Offline

    6
    ReputationRep:
    (Original post by Onnadhiel)
    Thanks for the help. I didn't copy any of it, but it was helpful. Apparently some of why it wasn't working was me not having indented it enough times (not sure why, but it only worked when I'd pressed 'tab' three times, but I'm not going to question it)
    Yeh its annoying, in the editor it gives an error unless you indent with tabs, not spaces.
    Offline

    8
    ReputationRep:
    Is HQ Level 7 Challenge 1 meant to be any different to Level 6 Challenge 4? I've added the capitals and changed the start to Cola it wouldn't work? Are there any more modifications I need to make?

    It probably is something so simple that I'm staring right at and I just can't seem to figure it out lol
    Offline

    2
    ReputationRep:
    (Original post by Gruffen)
    I'm having a hard time trying to figure out 5-4! Any tips? (for some reason cat won't work as a command)
    I used grep there with the username kazuya and it came up with the username and password for that.
    Posted on the TSR App. Download from Apple or Google Play
    Offline

    3
    ReputationRep:
    (Original post by -andromeda-)
    anyone know about the cookies in level 5? i've just got a "user not recognised" coming up whatever i try, even though i've added a cookie
    Any luck? I'm currently getting the exact same, I know my problem is PEBKAC, but I can't work it out .-. I don't want the answer, but maybe a hint? haha
    Offline

    2
    ReputationRep:
    I'm stuck on L5 C7 about the website login page; creating a cookie, can anyone help out with the information that needs to go into the cookie? I've tried quite a few!
    Posted on the TSR App. Download from Apple or Google Play
    Offline

    2
    ReputationRep:
    (Original post by Lay-er8)
    Any luck? I'm currently getting the exact same, I know my problem is PEBKAC, but I can't work it out .-. I don't want the answer, but maybe a hint? haha
    Hint is useless, only told me that the name is user, something I knew.
    Posted on the TSR App. Download from Apple or Google Play
    Offline

    3
    ReputationRep:
    (Original post by Lavender2512)
    Hint is useless, only told me that the name is user, something I knew.
    So yeah, I've just completed it; if you haven't already, send me a DM and I can help you out. I won't give you the answer but I'll help.
    Offline

    1
    ReputationRep:
    (Original post by Lavender2512)
    I used grep there with the username kazuya and it came up with the username and password for that.
    thank you!
    • Thread Starter
    Offline

    12
    ReputationRep:
    Anyone had any luck on L5 C9? I’m on level 7 otherwise and it’s bothering me -_____-
    Posted on the TSR App. Download from Apple or Google Play
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: May 29, 2018

945

students online now

800,000+

Exam discussions

Find your exam discussion here

Poll
Should predicted grades be removed from the uni application process

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.