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
Pepsi [2]
3 years ago
14

Define a Python function called leng_of_str to calculate the length of a string (Hint: Do not use the len function to find the l

ength of string"" Use for loop to find the length of string.)

Computers and Technology
1 answer:
Slav-nsk [51]3 years ago
7 0

Answer:

The code is attached.

Explanation:

  1. the function accepts string as a parameter
  2. inside fuction there is a caunter variable initialized 0
  3. for every character in the string counter increases by 1
  4. returns final value of i as an integer, which is also the length of the string given

You might be interested in
A device which lets you interact with the computer
Gnoma [55]

Answer:

Input, output, storage.

Explanation:

Input is used to interact with, or send data to the computer (mouse, keyboards, etc.). Output provides output to the user from the computer (monitors, printers, etc.). And storage which stores data processed by the computer (hard drives, flash drives, etc.).

3 0
2 years ago
Read 2 more answers
at the bank there is 4 lines with 7 costumers and there are five customers left over. how many customers are there​
mrs_skeptik [129]
Answer: 33
7 times 4 is 28 add the left over 5 makes 33 people
4 0
2 years ago
JAVA
butalik [34]

Answer:

import java.util.*;

public class MyClass {

   public static void main(String args[]) {

       Scanner input = new Scanner(System.in);

       System.out.print("Input a word: ");

       String userinput = input.nextLine();

       for(int i =0;i<userinput.length();i+=2) {

           System.out.print(userinput.charAt(i));

       }

   }

}

Explanation:

This line prompts user for input

       System.out.print("Input a word: ");

This declares a string variable named userinput and also gets input from the user

       String userinput = input.nextLine();

The following iterates through every other character of userinput from the first using iteration variable i and i is incremented by 2

       for(int i =0;i<userinput.length();i+=2) {

This prints characters at i-th position

           System.out.print(userinput.charAt(i));

5 0
2 years ago
Who is better at fortnite mc creamy or mau?
Mama L [17]

Answer:

neither

Explanation:

fortnite sucks

8 0
3 years ago
Read 2 more answers
How many acute angles are in a square​
babymother [125]
0, a square has 4 right angles
7 0
1 year ago
Read 2 more answers
Other questions:
  • What are issues to consider when deciding to build software in-house or purchase commercial off-the-shelf software (cots)?
    14·1 answer
  • A financially stable person is able to
    12·2 answers
  • Identify any eight new programming languages and classify them based on their functionality.
    14·2 answers
  • 2.13) A simple rule to estimate your ideal body weight is to allow 110 pounds for the first 5 feet of height and 5 pounds for ea
    15·1 answer
  • Use a switch statement to display "one" if the user has entered 1, "two" if the user has entered 2, and "three" if the user has
    14·1 answer
  • Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).
    15·1 answer
  • 15 Points ASAP
    14·2 answers
  • . When attempting to minimize memory usage, the most efficient way to do group processing when using the MEANS procedure is to u
    13·1 answer
  • Zara wants to create some lines of code that are ignored by the computer. What should these lines begin with?
    5·1 answer
  • What type casting mechanism should be used if you want to safely change (cast) a pointer type for pointing to a different object
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!