What do I do there because I’m doing everything but they are still telling me to check if the code is correct
1/4/2022 12:56:09 PM
Daniel Kusi16 Answers
New AnswerWell, then just check your code? Please link your code if you need help. And tag the relevant programming language.
Please provide the code if you want others to help you. It's very hard to determine what's wrong with your code if we don't know how it looks.
What's that code and problem description? Mention details clearly... https://www.sololearn.com/discuss/333866/?ref=app
I am to write a program to take two integers as input and output their sum but i dont know why but i keep getting it wrong
Please don't post only ready-made code – it is not helpful for a beginner if you don't explain anything.
Daniel Kusi Read the task description carefully. Review the lessons. And if you need help with code then LINK YOUR CODE!
Go to Code section, click +, select Python, put your code there, save it. Come back to this thread, click +, select your saved code.
input() gets a string a_variable is necessary to store the input() a_variable = input() You'll need two integers to sum them up, Try a_number = int(input("Give me a number: ")) Python will evaluate first of all the inner function input() then it will evaluate the int() But it will work, only if the user input a valid whole number Otherwise, it will raise an ERROR message The second variable is similar to this another_number = int(input(("Give me another number: ")) For output, try: print(a_number + another_number)
Try this: You have two integers --> x and y and u should use input, because the exact numbers don't matter. So we use x and y as variables x = int(input()) y = int(input ()) #You need the parentheses when u write input. And int is before input. Then u can print the sum. print (x+y).
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message