1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vlabodo [156]
3 years ago
12

X = 10 y = 20 x > У print("if statement") print("else statement")

Computers and Technology
1 answer:
Ksenya-84 [330]3 years ago
5 0

Answer:

n

Explanation:

n

You might be interested in
Open excel program then use the (IF) function to fill the column of (Expensive/Cheap) then save your
svet-max [94.6K]

Answer:

(7,6)12>34=Mc²

Explanation:

AB

MA

B

F

с

AAB=BC,AM=MC

BM IAC , EF I BC

4 0
3 years ago
The word count of the active document is typically displayed on the ________.
romanna [79]

Click the Word Count in the Proofing Group. Maybe the name is the Bottom ribbon tab

4 0
3 years ago
An online service allows users to integrate their phonebook with their social media profiles and stores it on the cloud. The pho
Tasya [4]
A) Software as a Service (SaaS)

SaaS refers to full applications deployed in the cloud, whereas PaaS and IaaS refer to cloud services that allow for development of new applications with varying levels of hardware abstraction. IaaS usually refers to cloud Virtual Machines, and it allows more control over the types of computers used to run an application (Linux/Windows/RAM/CPUs/etc). PaaS is a set of minimum required components to make an application run, typically not visible to developers. Developers can write code and deploy to a PaaS service without configuring virtual machines or installing dependencies/Operating Systems.
6 0
3 years ago
Your program is going to compare the scores of two volleyball teams that play each other. To win a match in volleyball, a team m
Alenkasestr [34]

Answer:

#section 1

team1=0

team2=0

matches=[1,2,3,4,5]

for i in matches:

   print("For Game ", i)

#section 2

   while True:

       try:

           scoreA = int(input("Enter score for first team: "))

           scoreB = int(input("Enter score for second team: "))

       

           if scoreA < 25 and scoreB < 25:

               raise ValueError

           try:

               if abs(scoreA - scoreB) < 2:

                   raise  

               else:

                   break

           except:

               print("difference less than 2")

   

       except ValueError:

           print("Enter correct scores")

#section 3

       print("For Game ", i)

   if scoreA > scoreB:

       team1 = team1 + 1

   else:

       team2 = team2 + 1

#section 4

if team2 > team1:

   print("Team 2 is the winner")

else:

   print("Team 1 is the winner")

Explanation:

There is no way you can run the code without using a break statement because, in a while loop you have to pass an argument that will exit the loop. if you don't your loop will keep running and that's not good.

You might have also gone about it in a way that is a bit complicated. when writing code always look out for ways to make your work easier.

I used a For Loop, While Loop and an array.

#section 1

team1=0  

team2=0  

matches=[1,2,3,4,5]  

for i in matches:  

print("For Game ", i)  

- In this section two variables were declared two variables to hold the final results after both teams have played their 5 games and their scores recorded

- An Array holding the number of games they're to play was also declared. they are playing 5 so the Array "matches" holds 5 elements.

- The first loop here is the "For loop" and what it does is to run the block of code under it for all the elements in the Array.

- finally we print for game "i" where i is each game in the array

#section 2

 while True:

       try:

           scoreA = int(input("Enter score for first team: "))

           scoreB = int(input("Enter score for second team: "))

       

           if scoreA < 25 and scoreB < 25:

               raise ValueError

           try:

               if abs(scoreA - scoreB) < 2:

                   raise  

               else:

                   break

           except:

               print("difference less than 2")

   

       except ValueError:

           print("Enter correct scores")

- A while loop is always true unless it encounters an argument that is not true or a break statement is inserted.

- This section is responsible for taking all the inputs required and if a wrong input is entered it would show the specific error and ask you to make the input again.

- Here the Try and Except is use to handle the errors. When the Try block encounters an error it goes to the Except block and executes whatever it finds there.

- The first try block prompts and takes inputs, it then checks if the values inputted satisfies or violates the 25-point rule.

If it does not satisfy the 25-point rule, it goes to it's error block and prints "enter correct score" and the WHILE loop runs again.

within this Try block is nested another try block. if the first try block does not raise any error it proceeds to the second try block.

- The second Try block checks the difference between the scores and if it is less than 2, it raises an error and prints difference is less than 2 and runs the WHILE loop again.

- If there are no errors it BREAKS out of the WHILE loop then the FOR loop moves to the next match.

#section 3

       print("For Game ", i)

   if scoreA > scoreB:

       team1 = team1 + 1

   else:

       team2 = team2 + 1

- Remember there is still a for loop. This section prints the game we just recorded, and checks which team won. It then adds the win as a point(1) to the teams total score.

#section 4

if team2 > team1:

   print("Team 2 is the winner")

else:

   print("Team 1 is the winner")

- In this section the For Loop has finished running and the final values are ready, it compares the scores of both teams and declares the winner.

I have placed an attachment to help you see the code in action.

5 0
3 years ago
You are looking for a computer to provide a central location for online game play. What kind of computer do you need
katovenus [111]

Answer:

A server

Explanation:

It provides a centralized access point from where all the gaming computers can communicate and have their activities synchronized in real time.

7 0
2 years ago
Other questions:
  • Which is the highest level of the hierarchy of needs model?
    7·2 answers
  • On a chart created in excel, the horizontal axis is also called the ____.
    15·1 answer
  • Life can get busy and hectic but relationships matter what is an effective way to mending relationships that may have been negle
    9·1 answer
  • Write a program that reads a series of strings andprints only those strings beginning with the letter "b."
    7·1 answer
  • Computer hardware without software is usless and compyrersoftware without hardware is meaningless discuss
    6·1 answer
  • write a script that creates and calls a stored procedure named insert_category. first, code a statement that creates a procedure
    10·1 answer
  • Bullet points on a slide should be limited to _____.<br><br> A. 2<br> B. 4<br> C. 8<br> D. 10
    7·1 answer
  • I need to convert seconds since Unix Epoch so like the year, month, day, hour, minute, and second but I cannot figure it out. If
    14·1 answer
  • What is humanity’s greatest invention?
    13·1 answer
  • In a program you need to store identification numbers of 5 employees and their weekly gross pay.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!