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]
4 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]4 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
The expression 10,785(1.0275)x represents the amount of money in an investment account with interest that compounds annually for
Kamila [148]

E

According to the question,

The amount of investment money is $10,785 and the rate of interest is 1.0275%. The amount of money will be multiplied with the rate of interest and the year.

To get future value of the investment it will be like

FV = PV(1+i)x

Therefore , Future value = 10,785(1.0275)x

8 0
3 years ago
Read 2 more answers
What is word processing and word wrap?
damaskus [11]
MARK ME BRAINLIEST


1. Sometimes referred to as a run around, word wrap is a feature in text editors and word processors that moves to the next line when reaching the end without requiring you to press Enter. For example, in the picture below you can see as each section is shrunk the sentence is wrapped, so it does not extend past the border. You can see a live example of how text wraps by resizing the browser window on this page.

2. word proc·ess·ing

the production, storage, and manipulation of text on a computer or word processor.

8 0
4 years ago
Write a test program that creates two Rectangle objects—one with width 4 and height 40 and the other with width 3.5 and height 3
BARSIC [14]

Answer:

public class Rectangle {

   private double width;

   private double heigth;

   public Rectangle(double width, double heigth) {

       this.width = width;

       this.heigth = heigth;

   }

   public double getWidth() {

       return width;

   }

   public void setWidth(double width) {

       this.width = width;

   }

   public double getHeigth() {

       return heigth;

   }

   public void setHeigth(double heigth) {

       this.heigth = heigth;

   }

   public double perimeter(double width, double heigth){

       double peri = 2*(width+heigth);

       return peri;

   }

   public double area(double width, double heigth){

       double area = width*heigth;

       return  area;

   }

}

class RectangleTest{

   public static void main(String[] args) {

       //Creating two Rectangle objects

       Rectangle rectangle1 = new Rectangle(4,40);

       Rectangle rectangle2 = new Rectangle(3.5, 35.7);

       //Calling methods on the first Rectangel objects

       System.out.println("The Height of Rectangle 1 is: "+rectangle1.getHeigth());

       System.out.println("The Width of Rectangle 1 is: "+rectangle1.getWidth());

       System.out.println("The Perimeter of Rectangle 1 is: "+rectangle1.perimeter(4,40));

       System.out.println("The Area of Rectangle 1 is: "+rectangle1.area(4,40));

       // Second Rectangle object

       System.out.println("The Height of Rectangle 2 is: "+rectangle2.getHeigth());

       System.out.println("The Width of Rectangle 2 is: "+rectangle2.getWidth());

       System.out.println("The Perimeter of Rectangle 2 is: "+rectangle2.perimeter(4,40));

       System.out.println("The Area of Rectangle 2 is: "+rectangle2.area(4,40));

   }

}

Explanation:

  • Firstly A Rectangle class is created with two fields for width and heigth, a constructor and getters and setters the class also has methods for finding area and perimeters
  • Then a RectangleTest class containing a main method is created and two Rectangle objects are created (Follow teh comments in the code)
  • Methods to get height, width, area and perimeter are called on each rectangle object to print the appropriate value
5 0
3 years ago
How can random numbers in a range be generated in Java?.
Ksju [112]

Answer:

Java oh Na Na my  

Explanation:

5 0
3 years ago
Understanding the link between education and your desired career is an integral part of your career _______.
34kurt
I'm not 100% sure about my answer but based on articles I read online it makes the most sense to me.

Understanding the link between education and your desired career is an integral part of your career EXPLORATION.

The first step in career exploration is that you need to ask yourself this question "What can I do with this major?". If you have your answer, it is best to start exploring the connections that links your academic and professional interest.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Consider the pseudo-cpu discussed in class. the instruction format is 16 bits, which is subdivided into 4-bit opcode field and 1
    14·1 answer
  • Technological _____ is the term used to describe the merging of several technologies into a single device.
    13·1 answer
  • You send a report to your boss for feedback and she returns it to you with her edits noted in the electronic file. This Word fea
    11·1 answer
  • In controlling network traffic to minimize slow-downs, a technology called ________ is used to examine data files and sort low-p
    15·1 answer
  • What computer is designed to meet the computing needs of several people simultaneously in a small to medium-size business enviro
    5·1 answer
  • We already know that we can create a lunar lander application of the pipe-and-filter architecture style from three independent J
    6·1 answer
  • A system is composed of four parts, J, K, L, and M. All four must function for the system to function. The four component reliab
    6·1 answer
  • What is the forging of the return address on an email so that the email message appears to come from someone other than the actu
    11·1 answer
  • Which one of the following items is an example of software?
    5·1 answer
  • How does digital and hybrid computers differ in portability​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!