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
sattari [20]
2 years ago
5

Define a function that will return the length of a list

Computers and Technology
1 answer:
Alexus [3.1K]2 years ago
3 0

Answer:

len()function:

Explanation:

that's for python btw

i also know java if you want a java version

You might be interested in
Write a program that prompts the user to enter two characters and display the corresponding major and year status. The first cha
nydimaria [60]

Answer:

  1. import java.util.Scanner;  
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        Scanner input = new Scanner(System.in);
  5.        System.out.print("Please enter two characters: ");
  6.        String inputStr = input.nextLine();
  7.        if(inputStr.charAt(0) == 'B' || inputStr.charAt(0) == 'b'){
  8.            System.out.println("Biology");
  9.        }
  10.        else if(inputStr.charAt(0) == 'C' || inputStr.charAt(0)== 'c'){
  11.            System.out.println("Computer Science");
  12.        }
  13.        else if(inputStr.charAt(0) == 'I' || inputStr.charAt(0) == 'i')
  14.        {
  15.            System.out.println("Information Technology and Systems");
  16.        }
  17.        else{
  18.            System.out.println("Invalid major");
  19.        }
  20.        int num = Character.getNumericValue(inputStr.charAt(1));
  21.        if(num >= 1 && num <= 4){
  22.            switch (num){
  23.                case 1:
  24.                    System.out.println("freshman");
  25.                    break;
  26.                case 2:
  27.                    System.out.println("sophomore");
  28.                    break;
  29.                case 3:
  30.                    System.out.println("junior");
  31.                    break;
  32.                case 4:
  33.                    System.out.println("senior");
  34.                    break;
  35.            }
  36.        }
  37.        else{
  38.            System.out.println("Invalid year status");
  39.        }
  40.    }
  41. }

Explanation:

The code consists of two main parts. The part 1 is to validate the input major and print out the major according to the input character (Line 10 -22). If the input character is not matched with the target letters, a message invalid major will be displayed.

The part 2 is to validate the year status to make sure it only fall within the range of 1-4  (Line 26 -45). If within the range, the program will display the year major accordingly. If not a message invalid year status will be displayed.

4 0
3 years ago
"how do we store information in long term memory?"
Andru [333]

Answer:

By saving it in the hard drive.

Hope I helped!

8 0
3 years ago
Does a 21.6v battery work with a 24 volt controller
Mila [183]
Yes but you will need more than one battery
3 0
3 years ago
During an investigation of a cybercrime, the law enforcement officers came across a computer that had the hard drive encrypted.
borishaifa [10]

Answer:

b. Try to convince the owner of the computer to give you to decryption key/password.

Explanation:

Encrypted hard drives have maximum security and high data protection. to access them you need to enter a password to unlock them.

The image filtering technique is a method that serves to selectively highlight information contained in an image, for which it does not work.

The encryption algorithm is a component used for the security of electronic data transport, not to access data on an encrypted hard drive.

The encryption key is used in encryption algorithms to transform a message and cannot be exposed by disconnecting the hard drive from its power source.

4 0
3 years ago
7. Explain the steps for formatting a shape ?
alisha [4.7K]

Answer:

To begin, select the shapes you want to format. To select more than one, press and hold the Shift key. When you select one or more shapes, a new Drawing Tools tab appears. Here, you can select Shape Fill to fill the selected shapes with a solid color, gradient, texture, or picture.

Explanation:

3 0
2 years ago
Other questions:
  • Which graphic design tool allows you to lay images on top of one another? A. Layers B. Selection C. Drawing D. Color
    10·2 answers
  • HURRYYY A friend of yours has E-mailed their English paper to you so that you can proofread it. Explain the tools you would use
    15·1 answer
  • What does CTR stand for?
    10·2 answers
  • Given the function definition
    12·1 answer
  • What kind of video are you are able to watch by downloading it from the Internet?
    10·1 answer
  • ​A(n) ________ database makes it possible to store information across millions of machines in hundreds of data centers around th
    14·1 answer
  • To print a range of cells in the active worksheet, click___ in the settings in print gallery.
    7·1 answer
  • Private BLANK are cloud services available to members of a particular organization.
    6·1 answer
  • A digital forensic analyst examines the original digital source (e.g. computer, flash drive, backup tape) suspected of being inv
    5·1 answer
  • Algorithm to eat orange<br><br>​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!