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
Arlecino [84]
3 years ago
10

Return a formatted string with numbers The function below takes three numerical inputs: num1, num2, and num3. Implement it to re

turn a formatted string with an underscore between the first two numbers and space, exclamation point, and another space between the second and third number. For example, if the inputs are 1, 2, and 3, then the function should return the string '1_2 ! 3'.
Computers and Technology
1 answer:
alexira [117]3 years ago
3 0

Answer:

In Python:

def ret_formatted(num1,num2,num3):

   result = str(num1)+"_"+str(num2)+" ! "+str(num3)

   return result

Explanation:

This defines the function

def ret_formatted(num1,num2,num3):

This generates the output string

   result = str(num1)+"_"+str(num2)+" ! "+str(num3)

This returns the result string

   return result

You might be interested in
Which of the following statements about constructors are true? Check all that apply.
Neko [114]

Answer:

a. Partly True

b. True

Explanation:

(a) "new" keyword or syntax is used for the constructors while working in Perl and Moose object system for Perl.

For Visual Basics .Net, keyword "New" is used

For Python, "___new___" is used which allocates memory for instance and receives class as an argument.

For Objective-C, "alloc" and "init" are used for constructor method. "alloc" allocates memory for the instance and "init" handles the bulk of initializing the instance. Whereas, the "new" keyword calls both "alloc" and "init" for class instance.

(b) A constructor does not return any value because it is called by the memory allocation and object initialization code  in the runtime and not directly by your code.

5 0
3 years ago
How many bit strings of length 12 contain the substring 111000?
ELEN [110]

Answer:

448 strings

Explanation:

Each bit string can be filled by two ways either 0 or 1. If the bit strings of length contain the substring '111000' we therefore need a substring of length 6.

The selection of bits starts from the 1st bit to 7th bit enclosing the substring 111000 and ensuring that the length 6 are all filled. So, there will be  7 ways to contain this substring.

The total ways to contain this substring = 7*2^6 =448

Therefore 448 strings of length 12 contain the substring '111000'.

7 0
3 years ago
Explain the working principle of computer? can anyone tell​
Crazy boy [7]

Answer:

input process and output hehe

4 0
3 years ago
Which statement is true about laptops? Laptops use fewer components than desktops use. Most of the internal components that are
elena-14-01-66 [18.8K]

Answer:

Option 2 is correct.

Explanation:

Option 2 is correct because most of the components used in laptop is far different from Desktops. They are not able to fix in desktops. They are designed specially for laptops.

8 0
3 years ago
Read 2 more answers
What the benefit is of folders when working with files
Aleksandr [31]
There are many benefits to using folders when working with lots of files.  Here are a few examples:

- You can use folders to sort your files by type, almost like drawers in a desk, so you might have folders for Music, Photographs, Documents, etc.

- You can use folders to group files together into a specific group.  For example in your Photographs folder you might have a folder titled BirthdayPhotographs for all the photographs from your birthday.

- As in the example above you can nest folders to create sub-categories.  Documents might include folders for Homework, Stories, Poems

- Folders can have different permissions applied to them, allowing you to keep personal files in a private folder only you can access, or secret files in a folder that doesn't show up in the normal list of folders!
4 0
3 years ago
Read 2 more answers
Other questions:
  • 110011 * 1111 binary calculation
    15·1 answer
  • The ip address 172.16.80.125 is written in binary notation as:
    5·1 answer
  • Your employer's right to electronically monitor you is an issue of ____.
    13·1 answer
  • How to make an upside down exclamation point on mac?
    8·1 answer
  • Marla wants to transfer photos from her digital camera to her computer. She has plugged the camera's cord into the USB port. Wha
    11·2 answers
  • You attempt to telnet to system 192.168.1.240. You receive the following message: "Connecting To 192.168.1.240...Could not open
    5·1 answer
  • Which of these is an example of an input?
    11·1 answer
  • Could u give me brief summary of New Years
    14·2 answers
  • How is a WAN different from a LAN?
    10·1 answer
  • What process sends ones and zeroes across network cables
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!