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
trapecia [35]
2 years ago
10

#Write a function called get_integer that takes as input one #variable, my_var. If my_var can be converted to an integer, #do so

and return that integer. If my_var cannot be converted #to an integer, return a message that says, "Cannot convert!" # #For example, for "5" as the value of my_var, get_integer would #return the integer 5. If the value of my_var is the string #"Boggle.", then get_integer would return a string with the #value "Cannot convert!" # #Do not use any conditionals or the type() function.
Computers and Technology
1 answer:
DiKsa [7]2 years ago
6 0

Answer:

#here is function in python

#function that return integer if input can be converted to int

#if not it will return a string "Cannot converted!!"

def get_integer(inp):

   try:

       return int(inp)

   except:

       return "Cannot convert!!"

print()

#call the function with different inputs

print(get_integer("5"))

print(get_integer("Boggle."))

print(get_integer(5.1))

print()

Explanation:

Define a function get_integer() with a parameter.In this function there is try  and except.First try will execute and if input can be converted to integer then  it will convert it into integer and return it.If it will not able to convert  the input into integer then except will return a string "Cannot convert!!".In the function get_integer(), there is no use of any conditionals or type function.

Output:

5

Cannot convert!!

5  

You might be interested in
you manage a network that has multiple internal subnets. you connect a workstation to the 192.168.1.0/24 subnet. this workstatio
nydimaria [60]

Based on the configuration written below, the most likely cause of the problem is Incorrect subnet mask.

<h3>What is an Incorrect Subnet Mask?</h3>

The issue of an Incorrect Subnet Mask will take place if a network uses a subnet mask that is not theirs for its address class, and a client is still said to be configured with the same default subnet mask for the address class, and thus communication tend to fail to some closeby networks.

Therefore, Based on the configuration written below, the most likely cause of the problem is Incorrect subnet mask.

Learn more about subnet mask from

brainly.com/question/27418272

#SPJ1

See full question below

You manage a network that has multiple internal subnets. You connect a workstation to the 192.168.1.0/24 subnet.

This workstation can communicate with some hosts on the private network, but not with other hosts. You run ipconfig /all and see the following:

Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : mydomain.local Description . . . . . . . : Broadcom network adapter Physical Address. . . . . . : 00-AA-BB-CC-74-EF DHCP Enabled . . . . . . . : No Autoconfiguration Enabled. . . : Yes IPv4 Address . . . . . . . : 192.168.1.102(Preferred) Subnet Mask. . . . . . . . : 255.255.0.0 Default Gateway . . . . . . : 192.168.1.1 DNS Servers . . . . . . . : 192.168.1.20 192.168.1.27

What is the most likely cause of the problem?

8 0
1 year ago
What is the preferred procedure for putting customers on hold​
vesna_86 [32]

Answer/Explanation:

Explain the reason you need to put the caller on hold.

Ask for the person's phone number, in case the conversation is cut off.

Promise to return in a minute—or your best estimate of how long the hold will last. If you think the delay will be longer than a couple of minutes, ask for a number and a time when you can call back.

If, despite your best efforts, the delay is taking longer than anticipated, check in with the caller so that he doesn't feel abandoned. Again, offer to call back, "rather than keep you holding."

When you return to the phone, apologize for the inconvenience and thank the caller for his patience.

Use the caller's name frequently to add a sense of connection.

The first step you can take when putting a caller on hold and making it a satisfying experience is a systematic one. When a caller is on hold, 60 seconds seems like an eternity, so see if you can program the phone system to play music (calming classical or jaunty jazz is best) to break this perception of an interminable wait. Aside from that, however, putting someone on hold in a professional way depends on your behavior. The golden rule to keep in mind is as follows: how would you like to be treated if you were on the other end of the line?

MAKE ME THE BRAINLIEST!!!!!!!!!!!!

8 0
3 years ago
Read 2 more answers
Rob creates a Course_Details table that has four columns: Course _ID, Course_Name, Semester and Credits. A course may have 0.5 c
Digiron [165]
As a<span> </span>primary key<span> is a field in a table which uniquely identifies each row/record in a database table, then the advisable field for the primary key in here should be the Course_ID. That is very unique in that table</span>
7 0
2 years ago
Read 2 more answers
While speech recognition can operate without any confi guration, you can train it to more accurately recognize your voice. true
Natasha_Volkova [10]
True because any one can change or fix their voice just by practicing a voice.
3 0
3 years ago
A technician wants to limit access to a group of folders and is using Group Policy to prevent the users in the sales department
Mashcka [7]

Answer:

d. The technician should be setting NTFS permissions instead of using Group Policy.

Explanation:

NTFS (New Technology File System) permissions run on drives formatted with NTFS.Under NTFS permissions, individual users are granted permission at the Windows logon and so in this way local users and network users are affected, affecting each user from wherever he may be connecting from. In the example above using NTFS permissions would solve the problem of file system among departments .

4 0
2 years ago
Other questions:
  • Please use Python 3 to solve the following problem. Please also show all outputs and share code.The variable sentence stores a s
    6·1 answer
  • After placing her insertion point after Grandma’s Kitchen, order the steps Danica needs to follow to insert and format the regis
    8·2 answers
  • Which fingers should you use to type the reach keys?
    12·1 answer
  • What is the orbit? Define
    12·1 answer
  • PLS HELP ILL GIVE BRAINLY- (enter the answer) Microsoft _________ is an example of a desktop publishing software
    13·2 answers
  • How many different textile items would you find at a festival? (please list 5 items)
    7·1 answer
  • Claire wants to use a conditional statement in JavaScript that provides a block of statement to be executed if the condition is
    7·2 answers
  • Does anybody have the answer for 2.19.6 checkerboard for codehs??
    9·1 answer
  • How does the issue of cybersecurity relate to the internet of things?.
    5·1 answer
  • What is e banking effects
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!