Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8754535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:38:40+00:00 2026-06-13T13:38:40+00:00

this time I have more code to add to the problem . Our TA

  • 0

this time I have more code to add to the problem. Our TA wants us to write a function and then print the total number of words in the string, were each word is a group of characters seperated by a space, print the number of <B> tags, and print the number of hyperlinks.

The sample input is:

#statHTML("<B> Article One </B> <a href=http://news.google.com>News</a>")

BUT he wants us to ONLY use WHILE loops. I have finished it but only with FOR loops. Please assist as I cannot get it and even my friends are stuck

This is the code that I have so far.

str1T = len(str1.split())
print (str1T_strat_two)
str_t=str1.count('<B>')
print (str_t)
total = len(str1.split('<B>')) - 1
print (total)
print (str1.count('href'))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:38:41+00:00Added an answer on June 13, 2026 at 1:38 pm

    Here is a guide to get you going.

    string = "Article One News"
    words = string.split()
    
    i = 0
    while i < len(words):
        word = words[i]
        # Do whatever you want with this word
        i += 1
    

    You can put whatever code you need in place of the comment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello again everyone, This time I have a problem with Intent & Extras. here's
This time I have an error which I have been trying again to figure
this time i have a simple question: I have one table, related with himself
We have just migrated from solr3.5 to solr3.6, for all this time we have
I used to configure boost already, but this time I have no idea what
I have time in NSString like 15:15 I want to covert this NSString time
this time it's about Ruby On Rails. I have a form in the view
I'm trying to build this layout: I have this at this time: http://jsfiddle.net/Gh6mB/12/ The
I believe my question this time is simple. Let say I have a webpage,
hopefully a pretty simple question this time. I have a Select method in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.