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
s2008m [1.1K]
3 years ago
6

Write a pseudocode thats accept and then find out whether the number is divisible by 5 ​

Computers and Technology
1 answer:
andreyandreev [35.5K]3 years ago
5 0

Answer:

input number

calculate modulus of the number and 5

compare outcome to 0

if 0 then output "divisible by 5"

else output "not divisible by 5"

Explanation:

The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.

You might be interested in
A computer retail store has 15 personal computers in stock. A buyer wants to purchase 3 of them. Unknown to either the retail st
Dima020 [189]

Answer:

a. 1365 ways

b. Probability = 0.4096

c. Probability = 0.5904

Explanation:

Given

PCs = 15

Purchase = 3

Solving (a): Ways to select 4 computers out of 15, we make use of Combination formula as follows;

^nC_r = \frac{n!}{(n-r)!r!}

Where n = 15\ and\ r = 4

^{15}C_4 = \frac{15!}{(15-4)!4!}

^{15}C_4 = \frac{15!}{11!4!}

^{15}C_4 = \frac{15 * 14 * 13 * 12 * 11!}{11! * 4 * 3 * 2 * 1}

^{15}C_4 = \frac{15 * 14 * 13 * 12}{4 * 3 * 2 * 1}

^{15}C_4 = \frac{32760}{24}

^{15}C_4 = 1365

<em>Hence, there are 1365 ways </em>

Solving (b): The probability that exactly 1 will be defective (from the selected 4)

First, we calculate the probability of a PC being defective (p) and probability of a PC not being defective (q)

<em>From the given parameters; 3 out of 15 is detective;</em>

So;

p = 3/15

p = 0.2

q = 1 - p

q = 1 - 0.2

q = 0.8

Solving further using binomial;

(p + q)^n = p^n + ^nC_1p^{n-1}q + ^nC_2p^{n-2}q^2 + .....+q^n

Where n = 4

For the probability that exactly 1 out of 4 will be defective, we make use of

Probability =  ^nC_3pq^3

Substitute 4 for n, 0.2 for p and 0.8 for q

Probability =  ^4C_3 * 0.2 * 0.8^3

Probability =  \frac{4!}{3!1!} * 0.2 * 0.8^3

Probability = 4 * 0.2 * 0.8^3

Probability = 0.4096

Solving (c): Probability that at least one is defective;

In probability, opposite probability sums to 1;

Hence;

<em>Probability that at least one is defective + Probability that at none is defective = 1</em>

Probability that none is defective is calculated as thus;

Probability =  q^n

Substitute 4 for n and 0.8 for q

Probability =  0.8^4

Probability = 0.4096

Substitute 0.4096 for Probability that at none is defective

Probability that at least one is defective + 0.4096= 1

Collect Like Terms

Probability = 1 - 0.4096

Probability = 0.5904

8 0
2 years ago
Explain Importance of flowchart in computer programming
zhuklara [117]

Answer:

Flow charts help programmers develop the most efficient coding because they can clearly see where the data is going to end up. Flow charts help programmers figure out where a potential problem area is and helps them with debugging or cleaning up code that is not working.

creds to study.com (please don't copy it work by word, make sure to paraphrase it. otherwise plagiarism is in the game.)

Explanation:

7 0
2 years ago
Which term best describes a popular marketing strategy that centers
IceJOKER [234]

Answer:

Customer Relationship Management (CRM).

Explanation:

CRM is an acronym for customer relationship management and it typically involves the process of combining strategies, techniques, practices and technology so as to effectively and efficiently manage their customer data in order to improve and enhance customer satisfaction.

This ultimately implies that, these employees are saddled with the responsibility of ensuring the customer are satisfied and happy with their service at all times.

Marketing can be defined as the process of developing promotional techniques and sales strategies by a firm, so as to enhance the availability of goods and services to meet the needs of the end users or consumers through advertising and market research. It comprises of all the activities such as, identifying, anticipating set of medium and processes for creating, promoting, delivering, and exchanging goods and services that has value for customers.

Basically, CRM involves understanding customer needs, building and maintaining healthy long-term relationships with them, in order to add value or scale up your business.

Hence, customer relationship management (CRM) is one of the popular marketing strategy that is mainly based on the acquisition, enhancement, and retention of long-term relationships that add value for the organization and the customer.

8 0
2 years ago
Rosa is a high school freshman with no savings. She wants to buy a new smartphone in a few months for $300. Which account type b
Iteru [2.4K]
Simple savings account
6 0
2 years ago
Read 2 more answers
Given that a computer required​ service, what is the probability that it was a​ laptop? Given that the computer required​ servic
Greeley [361]

Complete Question:

A campus bookstore sells both types and in the last semester sold 56% laptops and 44% desktops. Reliability rates for the two types of machines are quite different, however. In the first year, 5% of desktops require service, while 15% of laptops have problems requiring service.

Given that a computer required service, what is the probability that it was a laptop?

Answer:

Probability = 0.084

Explanation:

Given

Laptops = 56%

Desktop = 44%

Service Required (Laptop) = 15%

Service Required (Desktop) = 5%

Required

Determine the probability that a selected computer is a laptop and it requires service.

The question tests our knowledge of probabilities using "and" condition.

What the question requires is that, we calculate the probability of selecting a LAPTOP that REQUIRES SERVICE

Note the capitalised words.

This will be calculated as follows:

Probability = P(Laptop) and P(Service Required (Laptop))

[Substitute values for P(Laptop) and P(Service Required (Laptop))]

Probability = 56% * 15%

[Convert to decimal]

Probability = 0.56 * 0.15

Probability = 0.084

8 0
3 years ago
Other questions:
  • List the data types that are allowed for SQL attributes.
    7·1 answer
  • Which of the following functions and expressions will convert the ASCII character "Z" to its numeric equivalent ASCII code?
    7·1 answer
  • Holly Carpenter argues that technology may actually prevent some kinds of evolution that would benefit humans. Do you agree with
    8·2 answers
  • In the RGB model, which color is formed by combining the constituent colors?
    14·2 answers
  • Which of the following is something you need to keep an eye out for
    7·2 answers
  • Interstate highway numbers Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 of 95) go north/south, an
    8·1 answer
  • Cómo fue posible que los alemanes exterminando seres humanos​
    11·1 answer
  • Most portable devices, and some computer monitors have a special steel bracket security slot built into the case, which can be u
    13·1 answer
  • THis took FOREVER! please go check it out, if you have seen my demo to this game, you will like the full version! https://scratc
    9·2 answers
  • Explain why the process of sketching in engineering might resemble a loop or a cycle.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!