Author Topic: coding error (op updated with better pic) (fixed?)  (Read 858 times)

I'm currently writing a hangman game in python (version 3.2.3)
I seem to be encountering a syntax error when i add the code to remove one life upon a false guess, can anyone help me?
The cursor is where the bottom equals sign is.


I believe i have fixed the problem, by removing the second global variable instance. The script will now run.

I put the image directly onto the thread as I don't wanna put it on a hosting website now.

« Last Edit: January 08, 2014, 03:22:01 PM by danisaac5 »

Hangman? What ever happened to the paper version?

jesus christ if you dont know how to prntscrn i dont think you should be coding.

I'm just learning coding so I might not be much help (JS, not Python yet).

Are the supposed to be semicolon breaks to tell the script when to pause and move on the next line?

despite the fact that you obviously know something about coding, you still took a picture of your screen with a camera. gj op
may the force be with you

jesus christ if you dont know how to prntscrn i dont think you should be coding.
its a raspberry pi.i don't think i can print screen on those and if i could how would i get it on here?.
« Last Edit: January 08, 2014, 12:42:19 PM by danisaac5 »

I'm just learning coding so I might not be much help (JS, not Python yet).

Are the supposed to be semicolon breaks to tell the script when to pause and move on the next line?
no,i don't understand (yet at least) why, but the script runs to the next line without having to put a semi colon at the end of each line.

Why are you defining the lives_remaining global variable a second time?

lives_remaining = lives_remaining - 1

or lives_remaining -= 1

Why are you defining the lives_remaining global variable a second time?

lives_remaining = lives_remaining - 1

or lives_remaining -= 1
I'll try that, thanks.
Right more i have a martial arts class to attend, so ill change the code when i can.

its a raspberry pi.i don't think i can print screen on those and if i could how would i get it on here?.

lol



open up paint

paste then crop photo

save and upload to a website.

post image link here.

you obviously know how to do most of that because you already have a photo in the op


@Khorde, that doesn't work by default in Linux, IIRC. (It depends on the desktop environment, actually.)

@OP, Install a screenshot utility, like gnome-screenshot or xfce4-screenshooter.

@Khorde, that doesn't work by default in Linux, IIRC.
they use ubuntu, right? one time I had that installed on my laptop for a few hours, and it worked just fine

they use ubuntu, right? one time I had that installed on my laptop for a few hours, and it worked just fine
Print Screen does work by default in Ubuntu and its derivatives, but a raspberry PI runs on Red Hat (don't quote me on that), and I'm not sure what DE it uses.

step 1: stop using globals

a raspberry PI runs on Red Hat

Raspberry Pi runs on nothing by default..? You need to install an OS to a SD card yourself.

(don't quote me on that)

what if I did

they use ubuntu, right? one time I had that installed on my laptop for a few hours, and it worked just fine
raspbian, a lighter form of Debian, so no.
I'm going to install a screenshot utilily, like King said.