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
Margarita [4]
3 years ago
8

in Python. Write a program whose input is two integers. Output the first integer and subsequent increments of 10 as long as the

value is less than or equal to the second integer. No whitespace/newline at the end.
Computers and Technology
1 answer:
11111nata11111 [884]3 years ago
6 0

Answer:

a, b = list(map(int, input().split()))

sequence = []

while a + 10 <= b:

   sequence.append(a + 10)

   a += 10

print(*sequence)

Explanation:

You might be interested in
Write a program to calculate student's average test scores and the grade. You may assume the following input data:
Brums [2.3K]

Answer:

def gradeAverage():

   grades = []

   i = 0

   while i < 5:

       a = int(input('enter score ' + str(i + 1) + ': '))

       grades.append(a)

       i = i+1

   #print(grades)

   average = sum(grades)/len(grades)

   #print(average)

   return average

def lettergrade(a):

   letter = 'A'

   if a < 60:

       letter = 'F'

   elif 59 < a < 63:

       letter = 'D-'

   elif 62 < a < 67:

       letter = 'D'

   elif 66 < a < 70:

       letter = 'D+'

   elif 69 < a < 73:

       letter = 'C-'

   elif 72 < a < 77:

       letter = 'C'

   elif 76 < a < 80:

       letter = 'C+'

   elif 79 < a < 83:

       letter = 'B-'

   elif 82 < a < 87:

       letter = 'B'

   elif 86 < a < 90:

       letter = 'B+'

   elif 89 < a < 94:

       letter = 'A-'

   elif 93 < a < 101:

       letter = 'A'

   return letter

numOfStudents = int(input('How many students: '))

names = []

aver = []

grade =[]

while numOfStudents > 0:

   studentName = input('Enter students name: ')

   names.append(studentName)

   a = gradeAverage()

   aver.append(a)

   grade.append(lettergrade(a))

   numOfStudents = numOfStudents - 1

for name in names:

       for score in aver:

           for letter in grade:

               if names.index(name) == aver.index(score) == grade.index(letter):

                   print('%s : Average =  %d  Letter Grade:  %s \n' %(name, score, letter))

                   break

Explanation:

The programming language used is python.

Two functions were created, the first function gradeAverage() was used to calculate the average values of the scores.

The second function lettergrade(a) was used to get the letter grade i.e(A, A-, C, D, e.t.c.) and it takes its argument from the average.

The main block of code asks for how many students are there and prompts the user to input their names and scores for all the students.

It takes that data calculates the average and the letter grade and prints out the names of the students, their average and their letter grade.

7 0
3 years ago
While designing a website, a(n) ____ allows you to identify the specific amount of space used on a particular page before it con
Aleks [24]
The answer would be A: wireframe, im pretty sure...

Hope this helped!! :)

8 0
3 years ago
Read 2 more answers
Mike needs to export some animation videos from his smartphone to an online platform. Which common file format can he use for th
Anastasy [175]
The answer would be b
8 0
3 years ago
What does "ttyt" stand for?
EastWind [94]
TTYT stands for "talk to you tomorrow".
6 0
4 years ago
Read 2 more answers
5. Many large organizations have had their database system hacked and customer data stolen. How should the security for the data
yawa3891 [41]

Answer:

Security is very crucial for any system. Vulnerability can be exposed on different levels which includes database breach, network level attacks and application level attacks. Different kinds of attacks can be carried out for different components. Attacks carried out on databases are different from other kinds of attacks.  

Attacks on databases can be because of any of the following exposed vulnerability.  

  • Poor system design and weak architecture
  • Incorrect configurations  
  • SQL injection attacks  
  • Weak Authentication
  • Brute Force attacks on user credentials
  • Improper privilege mechanisms  
  • Privilege abuse and excessive access.  
  • Poor design and flaws in programming
  • Data loss and information corruption

Security of database systems should be designed by considering best database security design practices. Network security will ensures that all the networks level attacks are detected and mitigated which includes DDOS attacks, Syn flood attacks, Session Attacks, DOS attacks and web security will focus on detecting and protecting attacks on web applications and on application layer attacks. This includes XSS attacks, XML attacks DOS attacks, DDOS attacks, Slow DDOS attacks, JSON violations, Protocol violations etc. However, Security of database will be different than the rest of security and should be based on following best practices

 

  • Physical and Network Access Security.
  • Access control by managing the database access strictly.
  • Encryption of Data
  • Authentication  
  • Web Application Firewalls  
  • Controlling Database Integrations
  • Manual and Scheduled Backups through secured channels.  
  • Auditing and Logging
  • Reporting and Monitoring

Explanation:

<em>Physical and Network Access Security is essential </em>as the database will be hosted on many physical servers or cloud servers. If the databases are hosted on web or cloud servers and gaining access to such servers will eventually give out root user permissions.

Attackers can have control access of databases as root users if they succeed in getting into physical servers.Use of network firewalls and Intrusion detection and prevention systems will provide security against physical system access.

<em>Access control </em> will allow only specific users to access the database. User Based access control will give restricted or policy based privileges to different users. An user will be allowed to perform only certain actions in such cases which will avoid user-access abuse.  

<em> </em><em>Data encryption</em><em> </em>will make sure that eves dropper will not be able to read any data during transmission or during inter process calls. Authentication mechanisms will help to use strong cryptic authentications for users. Use of great encryption, key exchange and hashing algorithms will harden the security and will make databases robust.  

<em> Web Application firewalls</em> will provide a strong security against SQL injection attacks, database connection flood attacks, other web related attacks which will safeguard the databases at the cloud storage and also will block the attacker by flagging them.  

<em>Best coding practices</em> and vulnerability scanning and assessment will secure all the database integrations. <em>Database integrations</em><em> </em>with other components needs to be carried out with utmost care by making sure to analyse all the impacted areas.  

It is always a good practice to have <em>scheduled and manual backup of databases</em> which will be useful against data corruption because of erroneous user actions. This will ensure that data is safe and can be recovered during toxic situations. This will help to control the damage.  

<em> Auditing of logs</em> to verify all the actions performed on the database by different users is necessary as it will help to analyse any misbehavior or compromised user access. <em>Monitoring and reporting</em> will make sure that only the right user has the right access and also it will alert any attacks on the database system.

8 0
4 years ago
Other questions:
  • What is the purpose of filters in a database?
    15·1 answer
  • Write a function DrivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar
    12·1 answer
  • Which type of exception would be detected if you used the conversion command Convert.ToDecimal to try to convert an ampersand?
    14·1 answer
  • A user prefers an external monitor, mouse, and keyboard for a laptop. The user does not want to use the built-in screen; however
    5·1 answer
  • What is the unofficial name given to the culture that has emerged from living in the age of digital media, whereby people are fr
    7·2 answers
  • Use the table and the drop-down menus to order the
    15·2 answers
  • Help please I would really appreciate <br>​
    5·2 answers
  • What is computer and example<br>​
    5·1 answer
  • What are different between system and application software?​
    14·1 answer
  • What would be the printed output of the Python code to the right?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!