Write a function solution that, given an integer N, returns the maximum possible
value obtained by inserting one '5' digit inside the decimal representation of integer N.
Examples:
1. Given N = 268, the function should return 5268.
2. Given N = 670, the function should return 6750.
3. Given N = 0, the function should return 50.
4. Given N = -999, the function should return - 5999.
Assume that:
• N is an integer within the range (-8,000..8,000).
In your solution, focus on correctness. The performance of your solution will not be the
focus of the assessment.
Copyright 2009-2021 by Codility Limited. All Rights Reserved. Unauthorized copying, publication or
disclosure prohibited

Answers

Answer 1

You did not specified the language, so I did my program in python.

Hope it helps!!!

Write A Function Solution That, Given An Integer N, Returns The Maximum Possiblevalue Obtained By Inserting

Related Questions

Cole has to edit and resize hundreds of photographs for a website. Which Adobe

software program would be the best choice to complete this task?

a.) Animate b.) Dreamweaver c.) Illustrator d.) Photoshop​

Answers

D.) Photoshop

Hope this helped, have a great day

What is Software Packages​

Answers

[tex]{\fcolorbox{red}{black}{\white {Answer}}}[/tex]

A software package is an assemblage of files and information about those files. ... Each package includes an archive of files and information about the software, such as its name, the specific version and a description. A package management system (PMS), such as rpm or YUM, automates the installation process.

Use EBNF notation to describe the syntax of the following language constructs.
A. A Java return statement, which could be either a return keyword followed by a semicolon, or a return keyword followed an expression then followed by a semicolon. Assume the grammar for expression has been defined as expr-> e
B. A Python return statement, either a return keyword, or return one or more expressions separated by comma.
C. Based on your syntax definition in (b), is return x+y; a valid Python return statement?

Answers

Answer:

Following are the description to the given points:

Explanation:

To resolve basic design restrictions, EBNF has also been developed.This principle was its lack of support can identify repeatings easily. It implies that popular BNF models, like the description of a sequence of replicable elements, are complicated and rely on contra intuitive logical math.

To set a list of words divided by commas (e.g. john, coffee, logic) for instance, we would like to say something like "a list is a word accompanied by a few commas or terms." Through EBNF, they may say so. However, there have been no "many" alternatives in the standard BNF format. So, to describe something such as "a list is a term or a number accompanied by a pair with notation and script," you have to say the same thing. Which functions, although it is difficult, as it specifies a variety of lists instead of a specific list.

Essentially, "john, coffee, logic is John's list, accompanied by coffees or, and logic" would be the earlier link.  That's why in Option (a):

The return statement in Java is:

return ('”‘ (~[“] | ” [”e‘])*);

In option (c), it is the valid statement.

name 2 kitchen tools equipment or materials you are going to store or stack in the following drawers and cabinet 1.flat drawer 2.upper cabinet 3 . Small drawer near countertops 4.Lower cabinets 5.Lower cabinets under the sink​

Answers

Answer:

silverware and dishwasher chemicles

Explanation:

Which of the following would be considered software? Select 2 options.
memory
printer
operating system
central processing unit (CPU)
Microsoft Office suite (Word, Excel, PowerPoint, etc.)
Thing

Answers

Answer:

Microsoft Office suite (Word, Excel, PowerPoint, etc.), and thing

Explanation:

The Operating system and Microsoft Office suite will be considered as software.

A Software is the opposite of Hardware in a computer system.

Let understand that Software means some set of instructions or programs on a computer which are used for operation and execution of specific tasks.

There are different type of software and they include:

Application Software are software installed into the system to perform function on the computer E.g. Chrome.System Software is the software designed to provide platform for other software installed on the computer. Eg. Microsoft OS. Firmware refers to set of instructions programmed on a hardware device such as External CD Rom.

In conclusion, the Operating system is a system software while the Microsoft Office suite is an application software.

Learn more about Software here

brainly.com/question/1022352

A data science experiment you are conducting has retrieved two historical observations for the price of Bitcoin(BTC) on December 2, 2017 of 11234 and 12475. Create a Python script that stores these two historicalobservations in a list variable namedbtcdec1.

Answers

Answer:

In Python:

btcdec1 = []

btcdec1 = [11234, 12475]

print(btcdec1)

Explanation:

First, create an empty list named btcdec1

btcdec1 = []

Next, insert the two data (11234 and 12475) into the list

btcdec1 = [11234, 12475]

Lastly, print the list

print(btcdec1)

Here is the problem specification: An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $14.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a program that calculates a customer's monthly bill. It should ask which package the customer has purchased and how many hours were used. It should then display the total amount due. Input Validation: Be sure the user only selects package A, B or C. Also, the number of hours used in a month cannot exceed 744. Use switch.

Answers

Answer:

In C++:

#include <iostream>

using namespace std;

int main(){

   int hour; char pkg; float bill = 0;

   cout<<"Package: "; cin>>pkg;

   cout<<"Hour: "; cin>>hour;

   if(hour<=744 && hour >=0){

       switch (pkg) {

           case 'A':

               bill = hour * 9.95;

               if(hour >10){bill = 10 * 9.95 + (hour - 10) * 2;}

           break;

           case 'B':

               bill = hour * 14.5;

               if(hour >10){bill = 20 * 14.5 + (hour - 20) * 1;}

           break;

           

           case 'C':

               bill = 19.95;

           break;

           

           default:

               cout << "Package must be A, B or C";}

cout<<"Total Bills: $"<<bill; }

else{ cout<<"Hour must be 0 - 744"; }

return 0;

}

Explanation:

This declares all variables:    int hour; char pkg; float bill=0;

This prompts the user for package type:  cout<<"Package: "; cin>>pkg;

This prompts the user for number of hours:    cout<<"Hour: "; cin>>hour;

This checks if hour is between 0 and 744 (inclusive)

   if(hour<=744 && hour >=0){

If true, the following is executed

A switch statement to check valid input for package

       switch (pkg) {

For 'A' package

           case 'A':

Calculate the bill

               bill = hour * 9.95;

               if(hour >10){bill = 10 * 9.95 + (hour - 10) * 2;}

End of A package:            break;

For 'B' package

           case 'B':

Calculate the bill

               bill = hour * 14.5;

               if(hour >10){bill = 20 * 14.5 + (hour - 20) * 1;}

End of B package:            break;

For C package            

           case 'C':

Calculate bill:                bill = 19.95;

End of C package:            break;

If package is not A, or B or C

           default:

Prompt the user for valid package                cout << "Package must be A, B or C";}

Print total bills: cout<<"Total Bills: $"<<bill; }

If hour is not 0 to 744: else{ cout<<"Hour must be 0 - 744"; }

I have a question about this programming assignment. The outcome when the user puts in Taylor for guest one and Fernando for guest 2 should be, "Your party is ruined and another bad pop song will be written." However, it does not. What do I add to get this outcome? Do I need more brackets?

Answers

Yes u need more brackets

Use guestNumber1.equals(Fernando) instead of the double equal signs. You cant compare strings with ==

where are all of your documents saved?

Answers

Answer:

create a my document folder so you can easily find it

1. In what ways a computer system is like a human being
la
2. In what ways is it not like a human being
3. What will happen if the computer is not invented​

Answers

a computer system can be considered similar to human beings in a way that it needed various parts in order to it to function it humans we need the or such as hurt brain veins exactra while computer need the CPU Ram etc

which internet service is the main reason the internet has expanded and what draws newcomers to the internet?

Answers

Answer:

It has spread throughout the world since it is a very useful tool since most things are facilitated, thus leading to a much more efficient daily life, which is why the internet is one of the main means for the functioning of the world today. day, as new technologies have revolutionized

Social media.

The term social media refers to those digital tools that facilitate the transmission of information, communication and social interaction between individuals. Thus, social media allows individuals to relate to each other, in a similar way as if they were physically interacting, but through computer means.

These social media can be from profiles on social networks to blogs, podcasts or even videos on digital platforms. In short, nowadays social media is an integral part of people's social life, and it is in many cases what ends up driving them to use the internet.

Learn more in https://brainly.com/question/21765376

What are the two choices for incorporating or removing changes when reviewing tracked changes made to a document?
Edit or Apply
Revise or Accept
Accept or Reject
Incorporate or Edit

Answers

Answer:

Accept or Reject

Explanation:

The only way to get tracked changes out of the documents is to accept or reject.

So, the correct option is - Accept or Reject

Answer:

C. Accept or reject

Explanation:

Computers has done more harm than good​

Answers

Explanation:

Teueeeeeeeeeeeeeeeeeee

Nolur acil lütfen yalvarırım sana

A customer comes into a computer parts and service store. The customer is looking for a device to provide secure access to the central server room using a retinal scan. What device should the store owner recommend to accomplish the required task?

Answers

Answer:

The owner should recommend facial ID or retinal scanner

In comparison to other biometric methods like fingerprint or retinal scans, it is quicker and more practical. Comparing facial recognition to typing passwords or PINs, there are also fewer touchpoints. Multifactor authentication is supported for a second layer of security check.

What secure access to central server room, a retinal scan?

The topic of facial recognition has always caused controversy. The technology, according to its proponents, is a useful tool for apprehending criminals and confirming our identities. Critics argue that it violates privacy, may be inaccurate and racially prejudiced, and may even lead to unjustified arrests.

Simpleness of use and implementation. Once put into practice, both approaches are simple to utilize. However, facial recognition is basically possible with any camera (although a higher quality camera will be more accurate). Iris scanning is impossible with a standard camera, and the technology can be very expensive.

Therefore, The owner should recommend facial ID or retinal scanner.

Learn more about scan here:

https://brainly.com/question/24319849

#SPJ2

Which term describes the surrounding area of this image?

The surrounding area of this image is called
Surroundings
Foreground
Background

This area is also called a
Negative
Positive
Neutral

Answers

Answer: background/negative

Explanation: the background, is negative space. A solid piece of sculpture occupies space, and makes the space around it come to life.

The objective of this task is to use Scapy to estimate the distance, in terms of number of routers, between your VM and a selected destination. This is basically what is implemented by the traceroute tool. In this task, we will write our own tool. The idea is quite straightforward: just send a packet (any type) to the destination, with its Time-To-Live (TTL) field set to 1 first. This packet will be dropped by the first router, which will send us an ICMP error message, telling us that the time-to-live has exceeded. That is how we
This project is based on SEED labs by Wenliang Du, Syracuse University.
get the IP address of the first router. We then increase our TTL field to 2, send out another packet, and get the IP address of the second router. We will repeat this procedure until our packet finally reach the destination. It should be noted that this experiment only gets an estimated result, because in theory, not all these packets take the same route (but in practice, they may within a short period of time). The code in the following shows one round in the procedure
a = IP()
a.dst '1.2.3.4
a.ttl = 3
b = ICMP()
send (a/b)
If you are an experienced Python programmer, you can write your tool to perform the entire procedure automatically. If you are new to Python programming, you can do it by manually changing the TTL field in each round, and record the IP address based on your observation from Wireshark. Either way is acceptable, as long as you get the result
Task: Sniffing and-then Spoofing
In this task, you will combine the sniffing and spoofing techniques to implement the following sniff- and-then-spoof program. You need two VMs on the same LAN. From VM A, you ping an IP X. This will generate an ICMP echo request packet. If X is alive, the ping program will receive an echo reply, and print out the response. Your sniff-and-then-spoof program runs on VM B, which monitors the LAN through packet sniffing. Whenever it sees an ICMP echo request, regardless of what the target IP address is, your program should immediately send out an echo reply using the packet spoofing technique. Therefore, regard-less of whether machine X is alive or not, the ping program will always receive a reply, indicating that X is alive. You need to use Scapy to do this task. In your report, you need to provide evidence to demonstrate that your technique works.

Answers

Answer:

kad ;ikajlfhdakjsfhadskfadhkjfahdjkfadk a jk h

Explanation:

Answer:

is this even a legit question

Binary is a base-2 number system instead of the decimal (base-10) system we are familiar with. Write a recursive function PrintInBinary(int num) that prints the binary representation for a given integer. For example, calling PrintInBinary(5) would print 101. Your function may assume the integer parameter is non-negative. The recursive insight for this problem is to realize you can identify the least significant binary digit by using the modulus operator with value 2. For example, given the integer 35, mod by 2 tells you that the last binary digit must be 1 (i.e. this number is odd), and division by 2 gives you the remaining portion of the integer (17). What 's the right way to handle the remaining portion

Answers

Answer:

In C++:

int PrintInBinary(int num){

if (num == 0)  

 return 0;  

else

 return (num % 2 + 10 * PrintInBinary(num / 2));

}

Explanation:

This defines the PrintInBinary function

int PrintInBinary(int num){

This returns 0 is num is 0 or num has been reduced to 0

if (num == 0)  

 return 0;  

If otherwise, see below for further explanation

else

 return (num % 2 + 10 * PrintInBinary(num / 2));

}

----------------------------------------------------------------------------------------

num % 2 + 10 * PrintInBinary(num / 2)

The above can be split into:

num % 2 and + 10 * PrintInBinary(num / 2)

Assume num is 35.

num % 2 = 1

10 * PrintInBinary(num / 2) => 10 * PrintInBinary(17)

17 will be passed to the function (recursively).

This process will continue until num is 0

what, if anything, is returned by the method call rearrange ("apple")?

Answers

Answer:

[tex] \boxed{E} \to \boxed{nothing \: is \: returned \: due \: to \: run \: tie \: error}[/tex]

Checkpoint 4.20 Assume hour is an int variable. Write an if statement that displays the message “Time for lunch” only if hour is equal to 12.

Answers

Answer:

if(hour == 12)

{cout << "Time for lunch";}

Explanation:

the full meaning of ENIAC,ABACUS,EDVAC,EDSAC
and explain ​

Answers

Answer:

ENIAC: Electronic Numerical Integrator and Computer.

ABACUS: Abundant Beads, Addition and Calculation Utility System.

EDVAC: Electronic Discrete Variable Automatic Computer

EDSAC: Electronic Delay Storage Automatic Computer

Define 'formatting'

Answers

Answer:

Formatting refers to the appearance or presentation of your essay.

Explanation:

Most essays contain at least four different kinds of text: headings, ordinary paragraphs, quotations and bibliographic references.

Formatting refers to the appearance or presentation of your essay. Another word for formatting is layout. Most essays contain at least four different kinds of text: headings, ordinary paragraphs, quotations and bibliographic references.

This component of the CPU is responsible for fetching the data, converting it, and de-converting
A) ALU
B) RAM
C) Control Unit
D) None of the above

Answers

Answer : C.Control Unit

Reason

In CPU there are two components name ALU and CU(Control unit) which ALU's function is to solve mathematic sequence and CU fuction is to vetch data to memory and manage commands and input & output.

#See pic for how the data proceed

can anyone teach me the basics of lua scripts 50 points
like how do i tell lua to move a object or send me a prompt asking me to do something

Answers

Answer:

are you talking about about a game, or coding?

. A digital computer has a memory unit with 24 bits per word. The instruction set consists of 150 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory.
a) How many bits are needed for the opcode?
b) How many bits are left for the address part of the instruction?
c) What is the maximum allowable size for memory?
d) What is the largest unsigned binary number that can be accommodated in one word of memory?

Answers

Explanation:

d answer

gzjxubejeiizbtozueg

Define a class named Money that stores a monetary amount. The class should have two private integer variables, one to store the number of dollars and another to store the number of cents. Add accessor and mutator functions to read and set both member variables. Add another function that returns the monetary amount as a double. Write a program that tests all of your functions with at least two different Money objects.

Answers

Answer:

#include<iostream>

using namespace std;

class Money{

    private:

        int dollars;  

       int cents;

   public:

       Money(int d=0, int c=0){

          setDollar(d);

          setCent(c);

       }

       void setDollar(int d){

           dollars = d;

       }

       void setCent(int c){

           cents = c

       }

       int getDollar() {

           return dollars;

       }

       int getCent() {

           return cents;

       }

       double getMoney(){

          return (dollars + (cents/100));

       }

};

// testing the program.

int main(){

  Money Acc1(3,50);

  cout << M.getMoney() << endl;

  Money Acc2;

  Acc2.setDollars(20);

  Acc2.setCents(30);

  cout <<"$" << Acc2.getDollars() << "." << Acc2.getCents() << endl;

  return 0;

}

Explanation:

The C++ source code defines the Money class and its methods, the class is used in the main function as a test to create the instances of the money class Acc1 and Acc2.

The object Acc2 is mutated and displayed with the "setDollar and setCent" and "getDollar and getCent" methods respectively.

1. Which of the following is used to operate computers and execute tasks?
A. Software
C. Update
B. Application
D. Upgrade

Answers

I wish I could get the new app to play this app and it is great for the iPad version

Answer:

a.software

I hope it hel


In the central processing unit (CPU).
A) Causes data to be input into the system
B) Responsible for the logical order of processing and converting data.
C) Both
D) None of the above

Answers

Answer : B.responsible for the logical order of processing and converting daya

Reason

As i said bro, in CPU there are ALU and CU where ALU is to do mathematics problem and CU where its to processing, converting data. CPU is like the brain of computer. But it can't be the input, the input can get through hardware, not CPU.

Which artistic technique uses multiple layers of small calligraphic or scribbled marks?
A. random hatching
B. crosshatching
C. shading
D. stippling
E. scrumbling

Answers

I would go with C.shading. It just makes the most sense

Answer:

E. scrumbling

Explanation:

6n^3+n-2 C++ code using Dev
i need only the code

Answers

Answer:

A = 6*pow(n,3) +n - 2

Explanation:

I'm not sure if this what you need but that's what I can help you with :)

What is htc one mseven​

Answers

"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"

Other Questions
Need help on another homework questionRick places the blue lens of one pair of 3D glasses over the red lens of another pair. He then looks through both lenses at the same time. What color will he see? A. blue B. black C. red D. white State any five causes of the empty treasury of France under Louis XVI. SOMEBODY PLEASE HELP ASAP PLEASE PLEASE PLEASE WILL GIVE YOU A GIFTCARD OF YOUR CHOICE which integer is 3 less than 7 2. What is the equation of the line graphed below? Need this paper written asap please help me and write itWRITING: PRINCIPLES OF CARBOHYDRATE LOADINGWrite a 300-500 word essay. Explain the purpose of carbohydrate loading. What benefit is it in terms of performance? Give examples of when carbohydrate loading is appropriate and for approximately how long. Give a sample diet for one day of carbohydrate loading; portions are not needed. The emphasis is on food choices. Include three meals and two snacks. Q5. A builder rents a digger. He pays a fixed charge of $30 plus $10 per hour to rent the digger. Work out how much he pays to rent the digger for: a) 1 hour b) n hours (1.5 x 2 = 3)Q6) The width of a rectangle is x centimetres and its length is (x+ 2) cm. Write down an expression for the perimeter of the rectangle, giving your answer in its simplest form. (2+1=3 marks) what is mass in physics Use the model to write a equation i need help asap pleasee! PLEASE HELP ASAP I WILL GIVE BRAINLY LIST FOR GOOD ANSWERS !!!!1. what effect did coal have on the have on the industrial revolution2. why is the north sea important to western europe ?3. Describe the agriculture of western europe.4. How is bronze made?5. what are the countries of western europe that the romans controlled?6. Describe how feudalism worked.7. How did guilds help cahnge life in western europe?8. what was one of the results of the plague?9. how did thinking change during the historical period know as the enlightenment?10. how did john locke's ideas affect the french revolution ] 8 Which expression is equivalent to 12x + 3y - 9x ?. 3x + . xy. 12 D. x+y What was the purpose of the Open Door Policy?to help Japan establish a sphere of influenceto promote economic stability in Latin AmericaO to gain equal trading access to China Why do the northern United States get more snow than the southern states?O Because there are colder temperatures in the winter months in the northern statesBecause there are colder temperatures in the winter months in the southern statesO Because there are warmer temperatures in the summer months in the northern statesO Because there are warmer temperatures in the summer months in the southern states Which list of reaction types are all redox reactions?A.Synthesis, decomposition, single-replacement, combustionB.Synthesis, double-replacement, combustion, decompositionC.Acid-base, single-replacement, double-replacement, synthesisD.Decomposition, double-replacement, acid-base, synthesis Enter a digit in each box to complete the division problem. Please answer ill give brainliest I really need help. What would be the slope-intercept equation?Stock value per share in a certain company has been steadily decreasing by $3.71 per share per year for the last ten years. Ten years ago the value of the stock was $147.25. Let y be the value of the stock x years after it begins to decline. Bert wants to save $5,742 so that he can buy the car he wants. If Bert can save $18 per day, how many days will it take him to save enough money? Check Your Understanding: True Stress and Stress A cylindrical specimen of a metal alloy 47.7 mm long and 9.72 mm in diameter is stressed in tension. A true stress of 399 MPa causes the specimen to plastically elongate to a length of 54.4 mm. If it is known that the strain-hardening exponent for this alloy is 0.2, calculate the true stress (in MPa) necessary to plastically elongate a specimen of this same material from a length of 47.7 mm to a length of 57.8 mm. analyze how animals benefit from the process of photosynthesis in plants