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
Use the drop-down menus to complete each sentence.
gizmo_the_mogwai [7]

Answer:1 3 and 5 is Columns and 2 4 and 6 is Rows theres your answer.

Explanation: its self explanatory.

3 0
2 years ago
Read 2 more answers
hãy lựa chọn một doanh nghiệp kinh doanh theo loại hình siêu thị việt nam em hãy tìm hiểu doanh nghiệp và thực hiện theo yêu cầu
Anastasy [175]

Quy trình kinh doanh, phương pháp kinh doanh hoặc chức năng kinh doanh là một tập hợp các hoạt động hoặc nhiệm vụ có liên quan, có cấu trúc bởi con người hoặc thiết bị, trong đó một trình tự cụ thể tạo ra một dịch vụ hoặc sản phẩm (phục vụ một mục tiêu kinh doanh cụ thể) cho một khách hàng cụ thể.

4 0
3 years ago
What is the output of this code? import java.util.HashSet; class A { public static void main(String[ ] args) { HashSet set = new
kompoz [17]

Answer:

The code will give an error that is "At least one public class is required in main file".

Explanation:

In the given code if we do not use the public access modifier to the class. It will give an error so, the correct code to this question as follows:

Program:

import java.util.HashSet; //import package

public class A  //define class as public.

{

   public static void main(String[ ] args) //define main method.

   {

       HashSet set = new HashSet(); //creating hashset object.

       set.add("A"); //add alphabet in hashset

       set.add("B"); //add alphabet in hashset

       set.add("C"); //add alphabet in hashset

       System.out.print("Size of HashSet is :"set.size()); //print the size of hashset.

   }

}

Output:

Size of HashSet is : 3

Explanation of the program:  

  • In the above program, we define a public class that is "A" and inside the class, we define the main method.  
  • Inside the main method, we create a HashSet class object that is "set".  
  • To add elements in HashSet we use add() function that adds elements and in the last, we use the size() function that prints the size HashSet.
5 0
3 years ago
How can i learn about networks
timama [110]

Answer:

1. Clients and servers—how services such as e-mail and web pages connect using networks.

2. IP addresses—how devices on a network can be found.

3. Network hubs, switches and cables—the hardware building blocks of any network.

4. Routers and firewalls—how to organize and control the flow of traffic on a network.

3 0
3 years ago
It is good practice, however, for policy _________________________ to solicit input both from technically adept information secu
s2008m [1.1K]

Answer:

It is good practice, however, for policy <u>Administrator </u>to solicit input both from technically adept information security experts and from business-focused managers in each community of interest when making revisions to security policies.

<u>Explanation</u>

Administrator is the person who has access to each part of the computer. Ha has rights to revise, add or edit application. The administrator is authorized to make and implement policies that are for the interest of the community.

7 0
3 years ago
Other questions:
  • An ______ is a simplified image. [4 letters]​
    7·2 answers
  • In this assignment, you are going to add conditional formatting to the spreadsheet you used in the previous
    13·1 answer
  • What is Software? Write the functions of Software?​
    11·1 answer
  • the part of the computer that contains the brain , or central processing unit , is also known the what ?
    12·1 answer
  • Cuzzzzzzzzzzzzzzzz iiiiiiiiiiiiiiiii remember everytimeeeeeeeeee on these days that i feel like you and meeeeeeeeeeeeeee
    15·1 answer
  • In this exercise, you are asking the user to set a alpha numeric password for any website. Put some conditions.
    8·1 answer
  • Please help it’s timed
    5·1 answer
  • Please answer me <br> in Assignment - Algorithms
    10·1 answer
  • Which of the following component is required to insert text in multimedia
    8·1 answer
  • What is a phone made out of dna
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!