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
Sunny_sXe [5.5K]
3 years ago
9

Find the number of ideal integers within the given segment [low,high] inclusive. An ideal number is a positive integer that has

only 3 and 5 as prime divisors. An ideal number can be expressed in the form of 3^x*5^y, where x and y are non-negativeintegers
Computers and Technology
1 answer:
Alex Ar [27]3 years ago
6 0

Answer:

  1. low = 10
  2. high = 50
  3. count = 0
  4. for i in range(low, high + 1):
  5.    if(i % 3 == 0 and i % 5 == 0):
  6.        count += 1
  7. print(count)

Explanation:

The solution code is written in Python.

We can create low and high variables to store the lower bound and upper bound in the range (Line 1-2)

Next create a counter variable, count (Line 3).

Use a for loop to traverse through the number between lower bound and upper bound and check if the current number-i is divisible by 3 and by 5, increment the count by one.

After the loop, print the count and we can get the number of ideal integers within the range (Line 8).

You might be interested in
Ryan is looking to buy a new HDTV set. He knows from friends that LCD set screens reflect less light than plasma set screens, bu
lbvjy [14]

Answer: Cognitive

Explanation:

 According to the question, the Ryan shows cognitive attitude towards the HDTV. The cognitive component basically refers to the three main components that are:

  • Thoughts
  • Beliefs
  • Attributes

The cognitive component is one of the type of attitude which basically consist of various types of thoughts, knowledge and the beliefs towards the any type of object. It is one of the belief and opinion of the attitude.  

3 0
3 years ago
Write 'T' for true and 'F' for false statements.
asambeis [7]
1-F
2-T
3-F
4-F
5-F
6 T
7-T
3 0
2 years ago
Statement: There are two files. One file, "badIP_list.txt" has a listing of known bad IP addresses. These addresses were extract
lapo4ka [179]

Answer:

See explaination

Explanation:

SOURCE CODE IN PYTHON:

inp=open('badIP_list.txt', 'r') #opening file for input

badIPs=[i.rstrip('\n') for i in inp.readlines()] #reading bad IPs

inp.close() #closing file

inp=open('server_logs.txt', 'r') #opening file for input

IPs=[i.rstrip('\n') for i in inp.readlines()] #reading all IPs from log

inp.close() #closing file

uniqueBadIPs=[] #to store unique bad IPs

countBadIPs=0 #to store count of bad IPs

countIPs=0 #to store count of all IPs

for IP in IPs: #iterating through the log of IPs

if IP in badIPs: #checking if IP is bad

countBadIPs+=1

if IP not in uniqueBadIPs: #checking if bad IP is unique

uniqueBadIPs.append(IP)

countIPs+=1

out=open('filter_list.txt', 'w') #opening file for output

out.write('_________________________________________________________\n')

out.write('Date : 26/07/2018\nName : Last, First\nMajor: CS\n\n')

out.write('Server logs contained these known bad IP addresses:\n')

for IP in uniqueBadIPs: #output the unique bad IPs

out.write(IP+'\n')

out.write('\n')

out.write('Total unique known bad IP\'s detected:\n'+str(len(uniqueBadIPs))+'\n\n')

out.write('Percentage of bad IP addresses in server logs:\n{:.2f}%\n'.format(countBadIPs*100/countIPs))

out.write('_________________________________________________________')

out.close() #closing file

5 0
3 years ago
What is a PivotTable?
professor190 [17]

Answer:

d

Explanation:

6 0
3 years ago
Read 2 more answers
Describe the objectives of e-commerce ?​
AnnZ [28]

Answer: eCommerce is to reach the more and right customers at the right time so that more orders can be placed and in turns, high revenue can be generated.

Explanation:

5 0
3 years ago
Other questions:
  • Each peripheral device has its own software, called a(n) ____, which contains the detailed instructions required to start that d
    6·1 answer
  • 5. Why would you want to wear white or light colors on a summer day?
    5·1 answer
  • Image below please help
    9·1 answer
  • The /tmp directory is a temporary directory and will not exist on a system at all times. True or False?
    15·1 answer
  • Why do clocks tick-toc?
    5·2 answers
  • How do I delete my brainly account?<br> I don't need anymore.
    13·2 answers
  • Yo, my Lenovo laptop keeps showing this screen but I can't sign in, can someone help me?
    5·2 answers
  • FOLLOW INSTRUCTIONS BELOW , WRITTEN IN JAVA LANGUAGE PLEASE AND THANK YOU !
    10·1 answer
  • _____ is rampant with bugs and shortcomings because most programmers do not know how or do not take the time to incorporate secu
    14·1 answer
  • Select the correct answer.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!