subject

what is the string of code to make a variable change pls make this into this code, this is pygame btw import pygame import time pygame. init() screen = pygame. display. set_mode([800,600]) keep_going = True WHITE = (255,255,255) BLACK = (0,0,0) BALL_SPEED_X = 5 BALL_SPEED_Y = 5 score = 0 # ball variables posx = 100 posy = 100 speedx = BALL_SPEED_X speedy = BALL_SPEED_Y radius = 14 #paddle variables paddley = 300 paddlex = 1 paddle_length = 100 paddle_speed = 5 while keep_going: for event in pygame. event. get(): if event. type == pygame. QUIT: keep_going = False # ball movement posx += speedx posy += speedy if posx - radius paddley + paddle_length/2) or (posy = 1: print(" You Lose!") exit() speedx = BALL_SPEED_X speedy = BALL_SPEED_Y posx = paddlex + 10 posy = int(paddley) else: speedx = -speedx elif posx + radius >= 800: speedx = -speedx elif posy - radius = 600: speedy = -speedy # paddle movement if paddley - paddle_length/2 = 600: paddley = 599 - paddle_length/2 else: key_object = pygame. key. get_pressed() if key_object[pygame. K_UP]: paddley -= paddle_speed elif key_object[pygame. K_DOWN]: paddley += paddle_speed # draw the screen elements screen. fill(BLACK) pygame. draw. circle(screen, WHITE, (posx, posy), radius) pygame. draw. rect(screen, WHITE, (paddlex, paddley - paddle_length/2, 5,paddle_length)) pygame. display. update() # slow things down time. sleep(0.02) pygame. quit()

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
Which of the following methods could be considered a “best practice” in terms of informing respondents how their answers to an on-line survey about personal information will be protected? respondents are informed that investigators will try to keep their participation confidential; however, confidentiality cannot be assured. respondents are informed that a research assistant will transfer all the research data to a password-protected computer that is not connected to the internet, via a usb flashdrive. the computer is located in a research team member’s office. the investigator uses the informed consent process to explain her institution’s method for guaranteeing absolute confidentiality of research data. the investigator uses the informed consent process to explain how respondent data will be transmitted from the website to his encrypted database without ever recording respondents’ ip addresses, but explains that on the internet confidentiality cannot be absolutely guaranteed.
Answers: 1
question
Computers and Technology, 22.06.2019 10:00
You need a reliable network for about twenty-five computers that will be distributed across a large building. it is important that the network be relatively cheap. which topology should you use?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
The graph shows median weekly earnings for full-time workers according to education level. which can you not conclude?
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
You know the right answer?
what is the string of code to make a variable change pls make this into this code, this is pygame bt...
Questions
question
Mathematics, 04.09.2021 01:20
question
Mathematics, 04.09.2021 01:20
question
English, 04.09.2021 01:20