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
Bess [88]
4 years ago
15

for number in range(1,51): if number % 3 == 0 and number % 5 == 0: print('XY') elif number % 5 == 0: print('X') elif number % 3

== 0: print('Y')
Computers and Technology
1 answer:
Elza [17]4 years ago
7 0

Output of the given code is:

Y

X

Y

Y

X

Y

XY

Y

X

Y

Y

X

Y

XY

Y

X

Y

Y

X

Y

XY

Y

X

Explanation:

In the for loop variable "number" will iterate from 1 to 150(inclusive).

in the "if" condition it is checking that the number is divisible by 3 and 5 both if the number is divisible by both 3 & 5 then it will print XY as output.

In the first "elif", if the number is divisible by 5 only then it will print X

as output.And in the last "elif", if number is divisible by 3 only then it will

print Y as output. Nothing will be printed if all three conditions are FALSE.

You might be interested in
If a business owner wanted to create a banner ad for his business on his webpage, he could use Java programming to develop a (n)
hichkok12 [17]

The answer is applet

An applet is a fully functional Java application that is usually embedded within a HTML page and runs in a web browser. It has the entire Java API at its disposal and extends the java.applet.Applet class. Its class provides the standard interface between the applet itself and the environment of the browser.

8 0
4 years ago
Read 2 more answers
List and briefly defined categories of security services.
Fynjy0 [20]
There are six categories of security services: authenticiation, access control, data confidentiality, data integrity, nonrepudiation, and availability service. First, is authentication service, which defines as the assurance that the communicator is legitimate and is the one that it claims to be. It can either be peer entity or data origin authentication. Second, access control which is to prevent any unauthorized uses of resources. After one is being authenticiated, then this service limit/controls who access? what accessing rights to the resources are allowed depending on the identified individuals. Data confifentiality: the protection of data from unauthorized disclosure. Data integrity: the assurance that data received are exactly as sent by an authorized entity (e.t.c, contain no modificafion, insertion, deletion, or replay).
7 0
4 years ago
What is the default file extension for a document created in Word 2016​
navik [9.2K]

Office Open XML (OOXML) format was introduced with Microsoft Office 2007 and became the default format of Microsoft Word ever since. Pertaining file extensions include: .docx – Word document. .docm – Word macro-enabled document; same as docx, but may contain macros and scripts.

7 0
4 years ago
(Game Design) A function that contains arithmetic symbols ( e.g. +, <, =/) is an operator.
Sedbober [7]

True

Because operators are the symbols that show the action.Just like  

2 + 5.

'+' is the operator and 2,5 is the operand.

4 0
3 years ago
Which extension is appropriate for Word document templates?
Ronch [10]

Answer:

<em><u>DOCX pretty sure</u></em>

<em><u /></em>

<em><u>hope that this helps :)</u></em>

<em></em>

5 0
3 years ago
Read 2 more answers
Other questions:
  • What kind of operating system is Windows? Command-line Browser based Graphical user interface Linux-based
    10·2 answers
  • How can you best protect yoursel and when using social media
    14·2 answers
  • If you are going to attach more than 15 devices to your wireless network, you should make sure your router supports which standa
    14·1 answer
  • What is a common method for testing a spot weld?
    13·1 answer
  • Can I publish all blog post on same day ?
    12·2 answers
  • Where do you access the status report of an assigned task that is open?
    12·2 answers
  • What is not soured of income
    6·1 answer
  • Write a program to print the area of a rectangle by creating a class named 'Area' having two methods. First method named as 'set
    6·1 answer
  • Olivia wants to change some settings in Outlook. What are the steps she will use to get to that function? open Outlook → File →
    7·2 answers
  • What is not recyclable in a<br> hybrid car<br> hydrogen car<br> petrol car
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!