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
Gettier contributed to what we know about the __________ model, while Rosch contributed to what we know about the __________ mod
svet-max [94.6K]

Gettier contributed to what we know about the exemplar model, while Rosch contributed to what we know about the prototype model. Prototype and exemplar theories are both versions of statistical theories of concepts. Prototype theories hold that concepts represent categories by means of a summary of the typical properties that category members possess, while exemplar theories hold that concepts represent categories by means of a cluster of individual category members that may be used to extract the statistical central tendency of the category.

6 0
3 years ago
Read 2 more answers
Using the college registration example from section 6.7.3 as a starting point, do the following:
Arada [10]

Answer:

Explanation:

NCLUDE Irvine32.inc

TRUE = 1

FALSE = 0

.data

gradeAverage WORD ?

credits WORD ?

oKToRegister BYTE ?

str1 BYTE "Error: Credits must be between 1 and 30" , 0dh,0ah,0

main PROC

call CheckRegs

exit

main ENDP

CheckRegs PROC

push edx

mov OkToRegister,FALSE

; Check credits for valid range 1-30

cmp credits,1 ; credits < 1?

jb E1

cmp credits,30 ; credits > 30?

ja E1

jmp L1 ; credits are ok

; Display error message: credits out of range

E1:

mov edx,OFFSET str1

call WriteString

jmp L4

L1:

cmp gradeAverage,350 ; if gradeAverage > 350

jna L2

mov OkToRegister,TRUE ; OkToRegister = TRUE

jmp L4

L2:

cmp gradeAverage,250 ; elseif gradeAverage > 250

jna L3

cmp credits,16 ; && credits <= 16

jnbe L3

mov OkToRegister,TRUE ; OKToRegister = TRUE

jmp L4

L3:

cmp credits,12 ; elseif credits <= 12

ja L4

mov OkToRegister,TRUE ; OKToRegister = TRUE

L4:

pop edx ; endif

ret

CheckRegs ENDP

END main

8 0
3 years ago
Component of search engine that indexes web sites automatically. A search engine's __________, copies web page source code into
kherson [118]

Answer:

crawler

Explanation:

A crawler (also known as spider or robot) is a component of search engine that indexes web sites automatically. It's main purpose is to systematically browses the World Wide Web, typically for the purpose of Web indexing.

It does this by visiting a list of linkss, as it does this it identifies all the hyperlinks found in the web pages and copies and saves them to the list of links to visit.

8 0
3 years ago
What kind of resources can we share over the network? Plzzzzzzzz help!!!!!!
lubasha [3.4K]

Sharing network resources requires abiding by certain constraints, as follows:

<span>Security: Organizations present ongoing opportunities for unauthorized shared resources. Security mechanisms should be implemented to provide efficient parameters.Compatibility: Various client-server operating systems may be installed, but the client must have a compatible OS or application to access shared resources. Otherwise, the client may encounter issues that create communication delays and requires troubleshooting.Mapping: Any shared OS hardware drive, file or resource may be accessed via mapping, which requires a shared destination address and naming conventions.<span>File Transfer Protocol (FTP) and File Sharing: FTP is not affected by shared resources because the Internet is FTP’s backbone. File sharing is an LAN concept.</span></span>
3 0
3 years ago
Read 2 more answers
Write a complete Java program called Rooter that gets a positive integer called "start" from the user at the command line and th
Nataly_w [17]

Answer:

The program in Java is as follows:

import java.util.*;

import java.lang.Math;

public class Rooter{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int start;

 System.out.print("Start: ");

 start = input.nextInt();

 while(start<=0){

     System.out.print("Number must be positive\nStart: ");

     start = input.nextInt();  }

 while(start>=0){

     System.out.println(Math.sqrt(start));

     start--;  }

}

}

Explanation:

This declares start as integer

 int start;

This prompts the user for input

 System.out.print("Start: ");

This gets input for start

 start = input.nextInt();

The following is repeated until the user input is valid i.e. positive

<em>  while(start<=0){</em>

<em>      System.out.print("Number must be positive\nStart: ");</em>

<em>      start = input.nextInt();  }</em>

The following while loop prints the square root of each number till 0

<em>  while(start>=0){</em>

<em>      System.out.println(Math.sqrt(start));</em>

<em>      start--;  }</em>

4 0
2 years ago
Other questions:
  • What technique is used to separate the different cell parts?
    15·1 answer
  • A(n) ____________________ defines the number and type of daemons that are loaded into memory and executed by the kernel on a par
    12·1 answer
  • Power point 2016 which chart element provides the boundaries of the graphic?
    6·1 answer
  • What is the communications activity of the Internet called
    15·1 answer
  • __________ refers to rules, statutes, codes, and regulations established to provide a legal framework within which business may
    13·1 answer
  • Next, go to the mw_tour.html file. Within the document head, create links to the mw_layout.css and mw_styles.css style sheet fil
    10·1 answer
  • HELP PLSSSSS!!! I WILL MARK BRAINLIEST FOR THE FIRST AND CORRECT ANSWER!!!
    14·2 answers
  • Worksheet Identify the devices for moving the cursor around your computer screen
    12·1 answer
  • This rlly isnt a question but give me some movies to watch or netflix movies/shows to watch
    12·2 answers
  • What is the difference between Brainly.com and Brainly.in? Ive been wondering because im not signed in under Brainly.in.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!