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
alisha [4.7K]
3 years ago
12

Programming Objectives

Computers and Technology
1 answer:
erma4kov [3.2K]3 years ago
7 0

Answer:

See Explaination

Explanation:

m=int(input("Please specify the number of elements in first list : "))

n=int(input("Please specify the number of elements in second list : "))

m1=1

list1=[]

n1=1

list2=[]

while m1<=m:

r1=int(input("input element {} of list1: ".format(m1)))

list1.append(r1)

m1+=1

while n1<=n:

list2.append(int(input("input element {} of list2: ".format(n1))))

n1+=1

def Intersection(list1,list2):

return set(list1).intersection(list2)

print("The intersection of two lists is {}".format(Intersection(list1,list2)))

You might be interested in
Which are the common database operations that can help organize data for easy retrieval?
Dima020 [189]

There are two common types for data access or retrieval

1. Sequential access is the main access mode only in batch systems, whereas files are used and updated at regular intervals.

2. Direct access - on-line processing requires direct access, whereby a record can be accessed without accessing the records between it and beginning of the file.

7 0
4 years ago
Which term is used to identify the connection of computers that are physically close to one another?
marta [7]

Answer: Local Area Network (LAN)

Explanation:

A Local Area Network (LAN) is a computer network that interconnects computers within a limited physical area such as a residence, school, laboratory, university campus or office building.

An example of  LAN network is "Phone, Computer and TV connected to a single network (such as a Home Network) via Cables, Wifi, Bluetooth or Hotspot". When the devices are interconnected or connected to a LAN, it becomes accessible between each other.

A simplest example of a LAN Device is a <em>Home Router.</em>

6 0
3 years ago
Read 2 more answers
Write a modular program that allows the user to enter a word or phrase and determines whether the word or phrase is a palindrome
Ostrovityanka [42]

Answer:

import java.util.Scanner;

public class num10 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter a word");

       String word = in.nextLine();

       String reversed = "";

       //Get the length of the string entered

       int length = word.length();

       //Loop through the string and reverse th string

       for ( int i = length - 1; i >= 0; i-- )

           reversed = reversed + word.charAt(i);

       //Compare the two strings "word" and "reversed"

       if (word.equals(reversed))

           System.out.println(word+" is a palindrome");

       else

           System.out.println(word+" is not a palindrome");

   }

}

Explanation:

Since we know that a palindrome word is a word that reads the same forward and backward, The Idea here is:

  • To obtain a word from a user.  
  • Use a for loop to reverse the word and store in another variable
  • Use if....else to compare the two strings and determine if they are equal, if they are equal then the word is palindrome.
6 0
4 years ago
consider the following code segment, which appears in a method in a class other than password. the code segment does not compile
Romashka [77]

The code segment does not compile because the method 'reset' does not return a value that can be displayed.

A method refers to a block of that which only runs when it is called. It is permissible to pass data, referred to as parameters, into a method. Methods are used to accomplish certain actions, and they are also called functions. As per the given code segment that appears as a method in a class, it does not compile because the method named 'reset' is not returning a value that can be printed on the screen as an output.

"

<em>Complete question:</em>

Consider the following code segment, which appears in a method in a class other than password.

Password p = new Password("password");

System.out.println("The new password is " + p.reset("password"));

The code segment does not compile because _____________ .

"

You can learn more about Method at

brainly.com/question/27415982

#SPJ4

4 0
1 year ago
In HTML, what is an element?
Dima020 [189]

Answer:

An markup language component is a private element of associate degree HTML (Hypertext Markup Language) document or web content. markup language consists of a tree of HTML nodes, like text nodes. Nodes may have content, as well as alternative nodes and text. several markup language nodes represent linguistics, or meaning.

Explanation:

Hope this help!

5 0
3 years ago
Read 2 more answers
Other questions:
  • Derek has an interest in designing video games. What requirements should he fulfill to be a game designer? To be a game designer
    10·1 answer
  • Which scientific law states that if a light source radiates isotropically, the light intensity falls off the further you get fro
    5·1 answer
  • URLs are directions that browsers follow in order to find specific web page files. What is the first part of the URL that is the
    14·1 answer
  • The sum of the elements of an integer-valued array recursively calculated as follows: The sum of an array of size 0 is 0; Otherw
    15·1 answer
  • Documenting Business Requirements helps developers control the scope of the system and prevents users from claiming that the new
    13·1 answer
  • String member function compare compares two strings (or substrings) and returns 0 if:
    5·1 answer
  • HELP ASAP
    7·1 answer
  • If String str = "Computer Science";, then what is the value of str.substring(10);? ​
    6·1 answer
  • Enlist few database you use often.
    12·2 answers
  • An application is getting downloaded, the total size is 52GB. So the speed of the WiFi is like.. 10mb per second, so the questio
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!