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
GalinKa [24]
3 years ago
7

Here is a nested loop example that graphically depicts an integer's magnitude by using asterisks, creating what is commonly call

ed a histogram: Run the program below and observe the output. Modify the program to print one asterisk per 5 units. So if the user enters 40, print 8 asterisks.num = 0while num >= 0: num = int(input('Enter an integer (negative to quit):\n')) if num >= 0: print('Depicted graphically:') for i in range(num): print('*', end=' ') print('\n')print('Goodbye.')
Computers and Technology
1 answer:
bogdanovich [222]3 years ago
7 0

Answer:

Please find the code in the attached file.

Output:

Please find the attached file.

Explanation:

In this code a "num" variable is declared that use while loop that check num value greater than equal to 0.

Inside the loop we input the "num" value from the user-end and use if the value is positive it will define a for loop that calculates the quotient value as integer part, and use the asterisks to print the value.

If input value is negative it print a message that is "Goodbye".

Please find the code link:   https://onlinegdb.com/7MN5dYPch2

You might be interested in
The variable sentence stores a string. Write code to determine how many words in sentence start and end with the same letter, in
irina [24]

Answer:

sentence = "hello wow a stores good"

same_letter_count = 0

sentence_list = sentence.split()

for s in sentence_list:

   if s[0] == s[-1]:

       same_letter_count += 1

print(same_letter_count)

Explanation:

*The code is in Python.

Initialize the sentence with a string

Initialize the same_letter_count as 0

Split the sentence using split method and set it to the sentence_list

Create a for loop that iterates through the sentence_list. If the first and last of the letters of a string are same, increment the same_letter_count by 1

When the loop is done, print the same_letter_count

4 0
3 years ago
Stamps offers at-home postage and mailing for a monthly fee. Customers are able to carry a balance on their accounts that allows
alexdok [17]

Answer:

The pop-up button is necessary to show acceptance of the terms

Explanation:

5 0
3 years ago
Bcghxdfghncfghndfgxdfgjfjgktyerdgftguj
IgorLugansk [536]

Answer:

Okay

Explanation:

4 0
4 years ago
Read 2 more answers
1.which screen appears after the password is typed (welcome, lock)​
jenyasd209 [6]

Answer:

it should be the welcome screen I will hope so lol

4 0
3 years ago
Read 2 more answers
How many possible mac addresses are there?
oksian1 [2.3K]
There are 6 octects ( 8 bit numbers ) in a MAC address, so there's 256^6 possible addresses.
6 0
3 years ago
Other questions:
  • The rmdir command (with no options) can only remove empty directories <br> a. True <br> b. False
    14·1 answer
  • A vehicle travels 2345 m in 315 toward the evening sun. What is its velocity
    13·1 answer
  • If i throw papers in the dryer to help them dry faster could that mess up the dryer?
    5·1 answer
  • Computer program allowing the computer to communicate<br> with a hardware device
    13·1 answer
  • _____________ data is what is translated to digital format so it can be stored in a computer.
    10·1 answer
  • Pick 2 different operating systems and discuss how they can be used in daily operations.
    5·1 answer
  • The measure of how quickly things may be converted to something of value is called.
    10·2 answers
  • Which of these statements regarding​ time-cost tradeoffs in CPM networks is​ true?
    6·1 answer
  • PLEASE HELP I WILL GIVE BRAINLIEST!!!!
    7·2 answers
  • 1.Microsoft Word is a/an ........​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!