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
Juliette [100K]
4 years ago
14

Write a program that displays, 10 numbers per line, all the numbers from 100 to 200 that are divisible by 5 or 6, but not both.

The numbers are separated by exactly one space
My Code:
count = 0
for i in range (100, 201):
if (i %6==0 and i %5!=0) or (i%5==0 and i%6!=0):
print(str(i), "")
count = count + 1
if count == 10:
string = str(i) + str("")
print(string)
count = 0
Any way to put the numbers 10 per line?

Computers and Technology
1 answer:
FromTheMoon [43]4 years ago
7 0

Answer & Explanation:

To print 10 on a line and each number separated by space; you make the following modifications.

print(str(i)+" ",end=' ')

str(i)-> represents the actual number to be printed

" "-> puts a space after the number is printed

end = ' ' -> allows printing to continue on the same line

if(count == 10):

     print(' ')

The above line checks if count variable is 10;

If yes, a blank is printed which allows printing to start on a new line;

The modified code is as follows (Also, see attachment for proper indentation)

count = 0

for i in range(100,201):

     if(i%6 == 0 and i%5!=0) or (i%5 ==0 and i%6!=0):

           print(str(i)+" ",end=' ')

           count = count + 1

           if(count == 10):

                 print(' ')

                 count = 0

You might be interested in
Source Code for TF2 - Please insert it here
Advocard [28]

Answer:

Hi T!

Explanation:

How are you?

3 0
3 years ago
Someone once observed that "the difference between roles and groups is that a user can shift into and out of roles, whereas that
mestny [16]

Answer:

All things considered newgrp has nothing to do with security jobs.  

newgrp sets the procedures bunch id which is in many frameworks are irrelevant. All gatherings are accessible. Gatherings are characterized as assortment of clients , bunch get to is conceded to documents dependent on the record gathering.  

Regularly (setgroups/getgroups ) all gatherings are in the process get to list.  

The authorization at a document or registry level has a 3 level arrangement of consents, for example, client proprietorship , bunch possession and others. All things considered the document authorization are a mix of read , compose and execute .we need both peruse and execute consent to run a program.  

A procedure may get to the document if a record has a place with the user(the proprietor of the document ) or if the gathering identifier coordinate on the gatherings in the clients bunches list. That entrance is constrained by the relating consents signals on the record.  

Gatherings have been over-burden with some "job" definitions. In any case, these are just over-burden and not a decent utilization of groups,the utilization of a gathering as a job was bolstered by the setgroup id banner , and by utilities like a sudo , where gathering name likewise coordinates a security control. It expect that the gathering name isn't utilized for documents yet once a client is in the gathering that client can apply the gathering to a record regardless of whether it isn't what the gathering was for.  

This over-burden use worked where frameworks didn't bolster genuine jobs. The over-burden utilize was only a work around.  

Linux has genuine job definition bolstered by SELinux models and can be applied to documents , clients , and forms.

7 0
4 years ago
In many cases, a ribbon organizes buttons and options in Select one: a. menus. b. sections. c. toolbars. d. groups.
katrin2010 [14]

Answer:

The answer is Groups

Explanation:

A ribbon organizes buttons and a program’s options into a series of groups or tabs at the top of the window. Typical ribbon tabs are composed of groups that are labeled as closely related commands. Dividing commands into groups in most Microsoft Office application helps users structure users structure the commands into related sets.

5 0
4 years ago
Read 2 more answers
Figuring out why your computer won't turn on falls under diagnosing.<br> A. True<br> B. False
igomit [66]
The answer to your question, is true
hope this helps :D
7 0
3 years ago
Read 2 more answers
What did creator Markus “Notch" Persson initially call his game
Veronika [31]

Answer:

Cave Game

Explanation:

Its initial Name was to be game cave in the developer phase and later changed to minecraft order of the stone and later changed to minecraft

7 0
3 years ago
Read 2 more answers
Other questions:
  • You learned about microcomputer a personal computer designed for use by an individual. Perform online research find out the diff
    12·1 answer
  • PLEASE HELP ASAP!! WILL MARK BRAINLIEST!! 20 POINTS!!
    6·1 answer
  • Name two common methods for performing dependency injection.
    15·1 answer
  • How would you display all your photographic work in your résumé, if you have a large volume of work?
    10·1 answer
  • What is the logical component of a TCP connection that can be assigned to a process that requires network connectivity?
    11·1 answer
  • As more and more computing devices move into the home environment, there's a need for a centralized storage space, called a ____
    13·1 answer
  • What are ya'll discords???
    10·2 answers
  • Write some positive and negative impacts of computer in our daily life​
    5·1 answer
  • Create a basic program that accomplishes the following requirements: Allows the user to input 2 number , a starting number x and
    12·1 answer
  • How do you create a myBlueprint account
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!