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
Volgvan
3 years ago
15

Write an if-else statement for the following: If user_tickets is less than 5, assign 1 to num_tickets. Else, assign user_tickets

to num_tickets. Sample output with input: 3 Value of num_tickets: 1

Computers and Technology
1 answer:
lesya [120]3 years ago
3 0

Answer:

Please find the answer in the attached image.

Explanation:

I wrote this program using JavaScript programming language.

// A function to check tickets

function tickets(user_tickets){

var num_tickets;

if (user_tickets < 5) {

 num_tickets = 1;

 return ('num_tickets: '+ num_tickets);

}

else {

 num_tickets = user_tickets;

 return('num_tickets: '+ num_tickets);

}

}

// Testing the tickets function

// With user_tickets = 3, 5, 8, and 1

console.log(tickets(3));

console.log(tickets(5));

console.log(tickets(8));

console.log(tickets(1));

You might be interested in
Technician A says that generic scan tools must be able to read all generic OBD-II codes. Technician B says that all generic scan
Likurg_2 [28]

Answer:

A. Technicians A and B

Explanation:

When we're talking about generic scanners and about all OBD-II codes, in this case, both technician A and B is the correct answer. Because we can scan all OBD-II codes with a generic scan.

But the technician A just says generic tools must be able to read all generic OBD-II codes and technicians B just says generic scan tools must be able to read manufacture OBD-II code, both are correct.

4 0
3 years ago
Yuri is a skilled computer security expert who attempts to break into the systems belonging to his clients. He has permission fr
Tatiana [17]

Answer:

b) White-hat hacker

Explanation:

This is also called an ethical hacker. Unlike the other options, a white-hat hacker is a person specialized on computational security which offers services to organizations to test how safe they are from informatic attacks (viruses, theft of information, etc). This is carried out  based on a agreement between the whihte-hat hacker and the client via a contract.  

8 0
3 years ago
Tara is a recent computer science graduate. After completing a three-month internship at an IT firm, she decides to become a tes
KengaRu [80]

Answer:

Explanation:

A tester has to evaluate, test and find errors, in this job you have to provide all the analysis and improve the software.

A tester has to evaluate:

  • Interact with buttons
  • Enter data
  • design for multiple situations

A tester must have these abilities:

  • The ability to work calmly under pressure.
  • Organizational capacity .
  • Logical thinking.
  • Ability to plan future work.
  • Pay attention to the details.

7 0
3 years ago
An arrangement that involves a customer paying a subscription fee to access a traditional client/server software application tha
Nata [24]

Answer:

Application Service Provider

Explanation:

An application service provider (ASP) is a vendor that provides individual users – or an entire enterprise – with software applications over a network, usually a local area network (LAN) or an LAN with internet access. The provided software may be referred to as software as a service, apps on tap, or on-demand software. One of the most basic forms of ASP is a vendor that provides access to a particular application software using HTTP protocol.

3 0
3 years ago
Dentify the benefits of workplace diversity. Select all that apply.
soldier1979 [14.2K]

Answer:

Explanation:

slay ty

7 0
2 years ago
Other questions:
  • A network system administrator would typically be responsible for which of the following duties?
    7·2 answers
  • Harvey is creating a presentation for his school project. He wants to have the same look on all the slides of his presentation.
    7·1 answer
  • Jared does not update his computer’s system software. What threat does his computer face?
    9·1 answer
  • Write a program that determines the value of the coins in a jar and prints the total in dollars and cents. Read integer values t
    5·1 answer
  • The assignment symbol can be combined with the arithmetic and concatenation operators to provide augmented assignment operations
    11·1 answer
  • Networking and telecommunications technologies, along with computer hardware, software, datamanagement technology, and the peopl
    11·1 answer
  • The difference between a checked and an unchecked exception is:
    10·1 answer
  • A group of users is unable to connect to the network. When testing several of the PCs and issuing the command ipconfig, the tech
    10·1 answer
  • What are the five generations of computers?​
    13·1 answer
  • High level language is___________
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!