Ask coding questions

← Back to all posts
Help (Again)
UmarQureshi4 (1)

@InvisibleOne, 'tis me again, and I need help (again). Run my code and find the part where it says about government fund, the day and the game file name. It keeps flashing - what is le problem?

<Umar Qureshi>

Answered by Coder100 (18934) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (18934)

change lines 104-109 to this:

while playing:
  os.system('clear')

  print("Game-File Name:", username)
  print("Day:", day)
  print("Government Fund:", fund)
  input()

the reason for this is because print doesn't give extra time, so python immediately runs the loop again.

InvisibleOne (3227)

Well, Coder100 was right, but the error you have now is because you put then which isn't really a keyword we use like that in python, you just put the : so it should be:

if ww2 == "1':

then is more of a lua thing.

UmarQureshi4 (1)

Where should I put the 'input()'?

VulcanWM (2912)

It keeps flashing because you have said while you are playing, it will clear the screen and then print, which means it'll go on forever because playing wont change.
Try adding an input so it waits before starting the loop again