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
2 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]2 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
There is an enormous amount of information on the Internet that is automatically separated into good content and not-so-good con
Lena [83]
False u would figure out yourself if it's good or bad
6 0
3 years ago
Ok so I usually don’t do this but I just need an answer , on Instagram a notification popped up while I was watching someone’s s
statuscvo [17]

Answer:

I think it was about cheaper ads on Instagram and how they are lowering their prices.

Explanation:

6 0
3 years ago
Read 2 more answers
They have outlined their technical needs and have sent some of the documentation along with the potential provider's SLAs and te
iren2701 [21]

Answer:

A concern that might be expressed by the legal department after reviewing the SLAs and terms of service is:

c. Ensuring that there is a guarantee that the cloud service provider will provide notice in the event that they decide to discontinue operations.

Explanation:

The SLA that the legal department will review should include a description of the services to be provided, expected service levels, measurement metrics for each service, each party's duties and responsibilities, and the contract remedies or penalties for breach, among others.  But the legal department will be mostly concerned with legal remedies during breaches, liability limitation and warranties, and intellectual property protection issues than with more technical issues.  This is despite the fact that all the terms of the SLA will be diligently reviewed by the legal department.

7 0
3 years ago
Sam works in a real estate office. An offer comes in on a house but the homeowners are on vacation. He needs the homeowners to s
Digiron [165]

Answer:

Sam should send a digital document and request a signature. The could be fax or even an image printed out, if neither is possible get in contact with eh owner and his lawyer for more help.

Explanation:

3 0
3 years ago
Who do u play as in sister location
seropon [69]
Well, it really depends on who you believe, because i have a lot of friends who say it is Purple Guy, but i have others that say you just play as an unknown character. So, i would go with Purple Guy, but I'm only like 85 percent sure.
5 0
3 years ago
Read 2 more answers
Other questions:
  • A network engineer is configuring a network to be able to relay IPv6 packets. The network only supports IPv4 and does not have d
    11·1 answer
  • If you interview a dentist to learn about her experiences on the job, she is considered a secondary source of information. Pleas
    7·2 answers
  • A friend is having a problem with keeping a fish tank at the right temperature so the fish stay healthy. Describe how you could
    9·1 answer
  • If you were to mount a nonmetallic box to the front of a stud, what type of bracket should the box have? A. FP B. BP C. NP D. JP
    13·1 answer
  • Which os the following is NOT true about the proof of work concept?
    8·1 answer
  • How to be good at photography?
    5·2 answers
  • What type of software testing is generally used in Software Maintenance?
    11·1 answer
  • 1. Do our shared social experiences lead us to think<br><br> communication is a cure-all?
    13·1 answer
  • If you delete a conversation many times with someone like this, will you stop receiving messages from them?
    13·1 answer
  • What was the name of the first personal computer and what year was it introduced
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!