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
BlackZzzverrR [31]
3 years ago
11

Write a function "nonRepeatings" that takes a string "s3" and returns the non-repeating characters in this string. Sample Input

s3 = "aaazzzdcccrttt" Sample Output The non-repeating characters are; d ryou are suppose to use for loops to go throw and return a dictionary of non repeating letters.
Computers and Technology
1 answer:
Furkat [3]3 years ago
6 0

Answer:

def nonRepeatings(s3):

   non = []

   letter_dictionary = {}

   for l in s3:

       if l in letter_dictionary:

           letter_dictionary[l] += 1

       else:

           letter_dictionary[l] = 1

   for c in letter_dictionary:

       if letter_dictionary[c] == 1:

           non.append(c)

   

   return non

Explanation:

- Declare an empty list and a dictionary

- Initialize a for loop that iterates through the given string s3

Inside the loop:

- If a character in the string is in the dictionary, increment its count by 1. If not, add it to the dictionary

When the first loop is done, initialize another for loop that iterates through the dictionary.

- Inside the loop, check if any character has a value of 1, put it to the non.

- Finally, return the non

You might be interested in
What is a primary risk to the Workstation Domain, the Local Area Network (LAN) Domain, and the System/Application Domain
eimsori [14]

It should be noted that a primary risk to the Workstation Domain is the absence of a firewall and unauthorized access to the workstation.

<h3>What is a workstation domain?</h3>

The Workstation Domain simply means an individual user's computer where his or her work takes place. It should be noted that computers operating systems have vulnerability which can be susceptible to hackers.

A primary risk to the Workstation Domain is the absence of a firewall and unauthorized access to the workstation.

Learn more about workstation on:

brainly.com/question/26097779

8 0
2 years ago
What is htc one mseven​
Tamiku [17]

"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"

8 0
2 years ago
What is the most flexible way to modify a report?
Vesna [10]

Answer: Use the Design view

Explanation: Using a Design view to modify a report is the most flexible way to modify a report as opposed to a layout view which is another way to modify a report .  The design view  is flexible in the sense that it provides a more outlined structured view of your report that you can see the header and footer for the report. it also affords you the ability to control your  report in terms of changing many properties, adjusting images, labels  and editing  text box, etc.

8 0
2 years ago
The database structure in a dbms is stored as a _____.
Colt1911 [192]
This will be stored as a collection of files
6 0
2 years ago
Write a program for TIC TAC TOE in PYTHON
masya89 [10]

Answer: much too long to write here: see attached

Explanation:

3 0
3 years ago
Other questions:
  • Can you subnet the 172.16.128.0/17 network address to support this subnet?
    6·1 answer
  • What is the operating system?
    9·1 answer
  • Which are types of online resources that students can use for help? Check all that apply. simulated labs web-based educational g
    12·2 answers
  • Benching system are prohibited in
    5·1 answer
  • 1. select the correct answer from the given options.
    5·1 answer
  • What are the services offered by web-based email?​
    12·1 answer
  • . Which of the following is NOT a
    12·1 answer
  • What is the purpose of application software policies? Check all that apply.
    9·1 answer
  • Where can i make a 3d animation for free ( pls don't trick me)
    12·1 answer
  • 4.2.5 codehs text messages answer
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!