Jump to content

Celious

Member
  • Posts

    43
  • Joined

  • Last visited

Everything posted by Celious

  1. So this mainly happens when i open netflix or something and when i try to move my mouse or click on something i just get a massive lag spike where the screen freezes but i can still hear audio playing, when i try to alt tab this happens too PC specs: Ryzen 5 2600 RX570 8GB RAM
  2. just tried with another monitor and no changes
  3. The monitor has a dual link DVI-D and a VGA (im using VGA)
  4. SPECS: Ryzen 5 2600 CPU A320M-S2H-CF Motherboard (Currently installed) GTX 660 8GB RAM stick CX 650 PSU The motherboard's VGA and DVI-D outputs dont display anything the only way to get the monitor to turn on is using the GTX 660's DVI port converted to VGA, the DVI-D port will not work I tried connected my RX 570 but no POST either
  5. Well my teacher just told me it doesn't have to be in tkinter so I just made it with no problem
  6. import Tkinter window = Tk() window.title(“Grid-Game”) window.geometry(“720x460”) window.mainloop()
  7. My teacher gave me a sheet and said I have to make this game, here's the link that I found: http://www.ocr.org.uk/Images/266758-unit-j276-03-programming-project-task-3-sample-non-exam-assessment.pdf Any help with be greatly appreciated
  8. I fixed it now, I needed to put ”global player_dmg” inside the functions
  9. import time import random from random import randint #Player stats player_hp = 100 player_gold = 100 #Player skills Defence = 0 Attack = 0 Magic = 0 Level = 1 #Enemy stats enemy_hp = 100 enemy_dmg = 5 player_dmg = '' def light_attack(): chance = (randint(1,100)) if chance <20: player_dmg = 0 return player_dmg else: player_dmg = (randint(10,15)) return player_dmg def heavy_attack(): chance = (randint(1,100)) if chance <40: player_dmg = 0 return player_dmg else: player_dmg = (randint(20,30)) return player_dmg heavy_attack() print (player_dmg) for some reason it doesn't update the value of "player_dmg" so it prints nothing
  10. Did you make sure your RAM is firmly in its slot?
  11. Maybe you have overclocked it too much?
  12. Hello, i'm trying to make the damage of the sword random, i mean it is but its not changing values and its always the same import time from random import randint #Player stats player_hp = 100 player_dmg = 20 player_gold = 100 iron_sword = 1 gold_sword = 0 #Enemy stats enemy_hp = 100 enemy_dmg = 10 #Swords if iron_sword ==1: player_dmg = (randint(20,30)) if gold_sword ==1: player_dmg = (randint(30,40)) #Base turn_cycle = True while turn_cycle: print("Player is attacking") enemy_hp = (enemy_hp - player_dmg) print("Player did" , player_dmg , "dmg, enemy has" , enemy_hp , "hp left!") time.sleep(2) print("") print("Enemy is attacking") player_hp = (player_hp - enemy_dmg) print("Enemy did" , enemy_dmg , "dmg, player has" , player_hp , "hp left!") print("") if enemy_hp < 1: print("you won") player_gold = player_gold + 10 turn_cycle = False elif player_hp < 1: print("you lost") turn_cycle = False the player_damage is always the same.. so is there any way i can refresh it or something?
  13. nvm i got it, i assigned a variable to the randomiser then print the variable
  14. how do i store it?, btw i updated the code a bit import time from random import randint #Randomiser def alpha(): value = (randint(0,1)) if value == 1: return("HEADS") elif value == 0: return ("TAILS") #asking for input player1 = input("(Player 1) Heads or Tails?: ").upper() player2 = input("(Player 2) Heads or Tails?: ").upper() #printing result print("The coin is flipping...") time.sleep(0.3) print("The coin landed on: ",alpha()) ### I need a way to store this value ### #So i can use it here vv ## if player1 == alpha(): print("testing")
  15. You might of saw me already with an earlier version of this program, I have now finished it but there is one bug. Everything works fine but the "You won" and "You lost" statements, it seems to be kinda random. But here's the code: INFORMATION: PYTHON 3.6.2 import time from random import * def computerChoice(): Z = (randint(0,1)) if Z == 1: return("HEADS") elif Z == 0: return ("TAILS") def anwser(): x = (randint(0,1)) if x == 1: return("HEADS") elif x == 0: return ("TAILS") playerChoice = input("Heads or Tails: ").upper() if playerChoice == 'HEADS' or playerChoice == 'TAILS': print ("You chose:", playerChoice) time.sleep(0.2) print ("Computer chose:", computerChoice()) time.sleep(0.2) print("The anwser was: ", anwser()) if playerChoice == anwser(): print("you won") elif computerChoice == anwser(): print("you lost")
  16. alright thanks, how do i mark this as solved?
  17. alright i did that this is what i updated the code to be: import time from random import * def computerChoice(): Z = (randint(0,1)) if Z == 1: print("Heads") elif Z == 0: print ("Tails") return(z) def anwser(): x = (randint(0,1)) if x == 1: print("Heads") elif x == 0: print ("Tails") return (x) playerChoice = input("Heads or Tails: ").upper() if playerChoice == 'HEADS' or 'TAILS': print ("You chose:", playerChoice) time.sleep(0.1) print ("Computer chose:", computerChoice()) However it still comes up with an error, which is: NameError: name 'z' is not defined
  18. Trying to make a Heads or Tails program in Python, here is what I have right now: import time from random import * def computerChoice(z): Z = (randint(0,1)) if Z == 1: print("Heads") elif Z == 0: print ("Tails") return(z) def anwser(x): x = (randint(0,1)) if x == 1: print("Heads") elif x == 0: print ("Tails") return (x) playerChoice = input("Heads or Tails: ").upper() if playerChoice == 'HEADS' or 'TAILS': print ("You chose:", playerChoice) time.sleep(0.1) print ("Computer chose:", computerChoice) The problem is that at the last line instead of printing 'Heads' or 'Tails' it prints this: <function computerChoice at 0x030DFF18>
  19. Buy a Gtx 1050ti for around £150
  20. I had windows 8 installed on this laptop and the internet was working, I installed windows 7 and now the internet is no longer working, I tried finding drivers for it but i cant find any
  21. no its definatly a mouse poroblem but what can i do to fix it
  22. I think its a software problem not hardware
×