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
AleksAgata [21]
3 years ago
6

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
Computers and Technology
1 answer:
Genrish500 [490]3 years ago
7 0

Solution :

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
Define storage device with two examples? ​
Vlad [161]

Answer:

Hehe!

Explanation:

Storage Device is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers. The central processing unit of a computer is what manipulates data by performing computations.

Examples: Hard disk and Floopy Disk.

7 0
2 years ago
Read 2 more answers
ABC Manufacturing Company is located in Hiroshima, Japan. Being prone to earthquakes, the company decided to implement a backup
maxonik [38]

The command interface protocol that I would suggest to the IT administrator is Secure Shell (SSH).

<h3>What is a command interface protocol?</h3>

A command interface protocol can be defined as a standard protocol that is designed and developed to processes commands in the form of lines of text to a software program that is installed on a computer system.

<h3>The types of command interface protocol.</h3>

In Computer technology, there are different types of command interface protocol and these include:

  • SSL
  • TLS
  • SSH

SSH is an acronym for Secure Shell and it is a standard network protocol that gives a IT administrator a secure way to access data over an unsecured network, especially when backing up data.

Read more on SSH here: brainly.com/question/17147683

7 0
1 year ago
Realizar una lista con 200 valores aleatorios entre 140 y 200 en Matplotlib. Graficar la distribución de los datos en un
Airida [17]

hola no conozco el toldo, pero necesito puntos cerebrales tan lo siento

Explanation:

7 0
3 years ago
Which of the following would be a show stopper for the development of an enterprise mobile app? The app demands data throughput
mestny [16]

Answer:

The cost of the app development is far greater than the tangible and intangible projected benefit of the app.

Explanation:

The first option is not correct, as in such cases, the app will be available in other areas. Also in case of a bad market share, it is not clear whether the app business will be profitable or not. And hence this is also not a correct option. However, the third option can be a show stopper, as it suggests the app business is not profitable, and no business or app developer is going to make such an app. And the fourth option is wrong, as some Governments will allow the app usage, and the app can still earn the profit. And hence, the correct option is as mentioned in the Answer section.

6 0
3 years ago
Which phrase best describes a spreadsheet?
choli [55]

Answer:

  (d) a computer file that uses rows and columns to organize, analyze, store, and manipulate data

Explanation:

A spreadsheet program and its associated data structure (a spreadsheet) are intended to emulate the appearance of a ledger that is organized into rows and columns.

4 0
2 years ago
Other questions:
  • Alan is quite surprised to see that his computer has been running slower than usual. Which of the following steps or actions sho
    9·2 answers
  • Which directory in the FHS stores programs and configuration information that can only be executed and modified by the root user
    10·1 answer
  • What two different passwords can be set to lock down a computer from unauthorized access?
    13·1 answer
  • In this exercise, your function will receive 2 parameters, the name of a text file, and a list of strings. The function will wri
    6·1 answer
  • What frequency band is used by bluetooth, 802.11b, and 802.11g?
    12·1 answer
  • What does it mean to read visual and audio text
    7·1 answer
  • a) Before writing any code, you should go through a design process. Try to do so carefully – either follow a top-down approach,
    15·1 answer
  • What defines the scope of a project?
    5·1 answer
  • How do I delete my Brainly account?
    6·2 answers
  • Write a recursive, string-valued method, reverse, that accepts a string and returns a new string consisting of the original stri
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!