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
Gwar [14]
3 years ago
7

Hey guys. Can u help me pls? I need to add number1 and number2 together on Python, I don't know what I'm doing wrong. Thx for yo

ur help.

Computers and Technology
2 answers:
vovikov84 [41]3 years ago
5 0

You need to convert number1 and number2 into integer because input() function returns a string, not an integer. And the + operation with 2 strings variables will concatenate them. The correct answer is :

number1 = int(input('Enter number 1 : '))

number2 = int(input('Enter number 2 :'))

number3 = number1 + number2

print(number3)

Lilit [14]3 years ago
4 0

print(number1 + number2)

You might be interested in
Explain what a surrogate key is.
Irina18 [472]

answer - surrogate key is a unique identifier used in databases for a modeled entity or an object. It is a unique key whose only significance is to act as the primary identifier of an object or entity and is not derived from any other data in the database and may or may not be used as the primary key.

4 0
3 years ago
A palindrome is a string that reads the same from left to right and from right to left. Design an algorithm to find the minimum
stepladder [879]

Answer:

Explanation:

The following code is written in Python. It is a recursive function that tests the first and last character of the word and keeps checking to see if each change would create the palindrome. Finally, printing out the minimum number needed to create the palindrome.

import sys

def numOfSwitches(word, start, end):

   if (start > end):

       return sys.maxsize

   if (start == end):

       return 0

   if (start == end - 1):

       if (word[start] == word[end]):

           return 0

       else:

           return 1

   if (word[start] == word[end]):

       return numOfSwitches(word, start + 1, end - 1)

   else:

       return (min(numOfSwitches(word, start, end - 1),

                   numOfSwitches(word, start + 1, end)) + 1)

word = input("Enter a Word: ")

start = 0

end = len(word)-1

print("Number of switches required for palindrome: " + str(numOfSwitches(word, start, end)))

3 0
3 years ago
A university wants to schedule the classrooms for final exams. The attributes are given below:
iVinArrow [24]

Answer:

See explaination

Explanation:

Clearly the entities are as follows:-

Course

Section

Room

Test

The relationship among entities are as follows:-

Course has Section

Test is conducted for Course

Test is conducted in Section

Test is conducted in Room

Attributes of each entities are as follows:-

Course (CourseID, Name, Department)

Section (SectionID, Enrollment)

Room (RoomNumber, Capacity, Building)

Test (Time)

Section is a week entity as, there may be same sections for different courses, therefore section uses the primary key of course entity as foreign key.

Also entity Test is dependent upon the entities Room,Section and Course, therefore primary keys of these entities will be used as foreign key in the Test entity.

Check attachment for the ER diagram

5 0
3 years ago
_____________________________ focuses on organizing, structuring, and labeling content in an effective and sustainable way.
Goryan [66]
The answer is (E) visual design
3 0
3 years ago
Which of these protections covers creative works such as books and artwork?
Oduvanchick [21]
The answer is D copyright
6 0
3 years ago
Other questions:
  • which resource do programmers sometimes have to refer to and use during planning the logical steps of the solution
    15·2 answers
  • Google plus has communities BUT
    5·2 answers
  • What are some examples of objects by which you can browse in the select browse option
    6·1 answer
  • You are a cleared employee. You discovered fraud and waste of money related to a classified program within your agency. If you r
    9·1 answer
  • In the end, businesses that use teams tend to have ______.
    7·2 answers
  • Explain how software is distinct from hardware.
    8·2 answers
  • who will follow me on tiktok and like all my videos? if you do ill give branlist and give u a shoutout and you can enter my big
    15·1 answer
  • Practice problems on functions. Write C function(s) to carry out the specified tasks. For each problem, also write the suggested
    15·1 answer
  • modified true or false analyze each statement then write technical the statement is true the statement is false underline the wo
    6·1 answer
  • Qbasic program to check whether an entered number is positive or negative or neutral​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!