DATABASE FUNDAMENTALS
BASICS OF BIG DATA
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
What would we call number 1, number 2 and sum in Pythonnumber1=input("Input first number:“) # variable to store 1st numbernumber2=input("Input second number:“)# variable to store 2nd numbersum=number1 + number2
|
Process
|
|
Selection
|
|
Pesudocode
|
|
Variable
|
Explanation:
Detailed explanation-1: -Using Sum() method The sum() method is used to compute the sum of digits of a number in python in a list. Convert the number to a string using str(), then strip the string and convert it to a list of numbers with the strip() and map() methods, respectively. Then, compute the total using the sum() method.
Detailed explanation-2: -To find sum of two numbers in Python, you can use Arithmetic Addition Operator + . + operator takes two operands and returns the sum of the two numbers.
There is 1 question to complete.