Question

preform a simple piece of basic python code

preform a simple piece of basic python code

Homework Answers

Answer #1

Here is the code to print sum of two given numbers:

Code for copying

a = int (input ("Enter the first element: "))
b=int(input("Enter the second element: "))
print("The sum of two numbers is : {}".format(a+b))

==============

code snippet

a = int (input ("Enter the first element: "))
b=int(input("Enter the second element: "))
print("The sum of two numbers is  : {}".format(a+b))
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
please write a LONG basic piece of code in Python language that focuses on using Variables,...
please write a LONG basic piece of code in Python language that focuses on using Variables, please do not make the code short! thank you!
Python code for Multivariable Unconstrained in unidirectional search
Python code for Multivariable Unconstrained in unidirectional search
can someone preform and show the output and etc's. with code The Case Assignment in Module...
can someone preform and show the output and etc's. with code The Case Assignment in Module 2 will accomplish three tasks: Demonstrate how to use pseudo code to help programming. Use Scanner class to get user input from a keyboard (allow user interaction). Demonstrate how to use class and objects (OOP concepts). Case Assignment Write a java program to help you calculate property tax. The program will perform the following tasks: Prompt the user to enter the property value of...
12) Using the code in question 8: Write the python statement which will remove both the...
12) Using the code in question 8: Write the python statement which will remove both the key ‘gpa’ and its value 2.8 from s2 13) True or False? A dictionary is a set of items; each item consists of a colon-separated key and value. Each item is separated from other items using a comma. Dictionaries may contain both simple and complex data types. A dictionary may contain data about a single object. Another dictionary may contain data about multiple objects....
Below is C code and Python code for an algorithm. C code: void foo( int n,...
Below is C code and Python code for an algorithm. C code: void foo( int n, int A, int B, int C ) { if( n==1 ) { printf("%d to %d\n",A,B); return; } foo( n-1, A, C, B ); printf("%d to %d\n",A,B); foo( n-1, B, C, A ); Python code: def foo(n , A, B, C): if n==1: print A, "to", B return foo(n-1, A, C, B) print A, "to", B foo(n-1, B, C, A) Let Hn be the number...
About python: Explain what is Polymorphism and provide a code snippet
About python: Explain what is Polymorphism and provide a code snippet
Create a python code that calculates fixed point iteration method.
Create a python code that calculates fixed point iteration method.
In pseudo code (or python) create a loop that will ask the use to enter and...
In pseudo code (or python) create a loop that will ask the use to enter and then add five zip codes to a one-dimensional array called zip code and then read and display that zip code array to the screen.
I am trying to print an essay in my python code but the words keep getting...
I am trying to print an essay in my python code but the words keep getting cut over two lines. How can i fix this using python code so that it is formatted nicely? thanks
Python Code Im working on a homework for python. having an issue with the assert equal...
Python Code Im working on a homework for python. having an issue with the assert equal saying that true isnt defined def is_multiple(num1,num2): if num1%num2 == 0: return true else: return false assert_equal(is_multiple(12,3),true) assert_equal(is_multiple(36,6),true) assert_equal(is_multiple(17,4),false) any help would be great thanks
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT