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
Natali5045456 [20]
3 years ago
7

write a python function that takes string j and returns a dictionary showing number of letters and digits in j. The returned dic

tionary is supposed to have two keys digits and letters. you can take advantage of isdigit() and isalpha() which are methods for string objects showing if a string is digit

Computers and Technology
1 answer:
k0ka [10]3 years ago
3 0

Explanation:

def letterDigitCount(j):

dic={"digits":0,"letters":0}

for a in j:

if a.isdigit():

dic["digits"]+=1

elif a.isalpha():

dic["letters"]+=1

return dic

You might be interested in
Which technology can be implemented as part of an authentication system to verify the identification of employees?
STALIN [3.7K]
The answer is smart card readers. Smart card readers can be implemented as part of an authentication system to verify the identification of employees.
5 0
2 years ago
An organization has a website with a guest book feature, where visitors to the web site can input their names and comments about
kozerog [31]

Answer:

B

Explanation:

6 0
3 years ago
Read 2 more answers
The code size of 2-address instruction is________________.? 5 bytes? 7 bytes? 3 bytes? 2 bytes
Finger [1]

Answer:

7 bytes

Explanation:

<u>2 Address Instruction</u>

The 2 address instruction consist 3 components in the format.

One is opcode,other two are addresses of destination and source.

<u>Example-</u>

load b,c | Opcode   destination address,source address

add a,d  | Opcode   destination address,source address

sub c,f    | Opcode   destination address,source address

Opcode consists of 1 bytes whereas destination address and source address consist of 3 bytes each.

(1+3+3) bytes=7 bytes

5 0
3 years ago
Which of the following is not one of the Fatal Four events that cause three out of five construction worker deaths? A. Caught in
k0ka [10]

The answer is D: Struck down.

Options A, B, and C are the most common types of fatal construction accidents in the United States. Falls, electrocutions, being struck by an object, and workers caught in or between things are responsible for over 64% of construction workers death. Among these four events, falls kill most construction workers followed by electrocutions, falling objects, and workers caught in or between things.


5 0
3 years ago
Read 2 more answers
In Python, how would you print the first 4 characters of "Help me pass!"
Semenov [28]

Answer:

sample_str = "Help me pass!"

first_chars = sample_str[0:4]

print('First four character: ', first_chars)

Explanation:

sample_str = "Help me pass!"

first_chars = sample_str[0:4]

H has index 0, e has index 1, l has index 2, p has index 3. the space has an index as well, etc.

7 0
2 years ago
Other questions:
  • Allan needs to ensure that an object is in a very precise location on a slide. He decides to use the Ruler option to achieve thi
    5·2 answers
  • which of the following are used on cable trays to protect the cable insulation from direct sunlight? a. barrier strips b. solid
    5·1 answer
  • The set of instructions that directs the computer to perform a variety of tasks is known as a
    9·1 answer
  • Write down a program in SNOBOL thatcalculates the factorial of 7.
    10·1 answer
  • Lori Redford, who has been a member of the Project Management group, was recently promoted to manager of the team. She has been
    12·1 answer
  • You have many drugs that you want to store electronically along with their purchase dates and prices, what kind of software woul
    7·1 answer
  • The terms Apps and Applications can be used interchangeably about software installed
    8·1 answer
  • At which track meet did two runners finish in a time equivalent to the mode?
    14·1 answer
  • Users who are connecting to an NLB cluster have been complaining that after using the site for a few minutes they are prompted t
    15·1 answer
  • What do you think that private information like passwords pin number will be guarded or shared with the public? why?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!