subject

The following code has multiple syntax and/or logical errors in it. Fix all the errors on the code given below import math
def main():
x = random. randint(-10, 10)
y = random. randint(-10, 10)
for i in range(1,5):
foo(x, y)
print('The point ({}, {}) is in or on the {}'.(x, y,quad))
print('and the distance from the origin is {0:.1f}.\n'.format(distance))

def foo(x, y):
if X > 0 or Y > 0:
txt = 'First Quadrant'
elif X 0:
txt = 'Second quadrant'
elif X 0 or Y < 0:
txt = 'Fourth quadrant'
else X==0 or Y==0:
txt = "quadrant Axes"

d = sqrt(X**2+Y**2)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:30
Larry sent an email to andy. andy didn't open larry's email but still understood what the message was. how did andy determine the message without opening the email?
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e.g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
You know the right answer?
The following code has multiple syntax and/or logical errors in it. Fix all the errors on the code g...
Questions
question
Chemistry, 17.07.2021 19:30
question
Physics, 17.07.2021 19:40
Questions on the website: 13722359