subject

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?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:40
Write a function 'music_func' that takes 3 parameters -- music type, music group, vocalist -- and prints them all out as shown in the example below. in case no input is provided by the user, the function should assume these values for the parameters: "classic rock", "the beatles", "freddie mercury". for example: input: alternative rock,pearl jam,chris cornell output: the best kind of music is alternative rock the best music group is pearl jam the best lead vocalist is chris cornell note: the print statements will go inside the for example: print("the best kind of music is"
Answers: 2
question
Computers and Technology, 22.06.2019 08:00
Two technicians are discussing the common u-joint. technician a says its input and output speeds should be equal. technician b says that it normally has two yokes. which technician is correct?
Answers: 1
question
Computers and Technology, 22.06.2019 14:00
What are procedures that keep a data base current
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
You know the right answer?
Write a program that displays, 10 numbers per line, all the numbers from 100 to 200 that are divisib...
Questions
question
Biology, 30.12.2019 19:31
question
Mathematics, 30.12.2019 19:31
Questions on the website: 13722361