+ 10
Can anyone help me solve this code?
here we can help you solve codes that you cannot solve
38 Réponses
+ 3
The input mentioned in the task description may be any integer number, not only 3 or 11. They are meant to be "user input". In the test cases, sololearn mimics such a user input.
The program should be doing this:
a + b = c
1. a and b is any number we get by 2 input()-calls
2. Cast a and b to be of type integer
3. Calculate c as the sum of a and b
4. Print c
+ 4
a=int(input())
b=int(input())
c=a+b
print(c)
#remeber the value should be in integer not in float
# I think that's the problem for you
+ 2
Simone shoe your attempt
In MWE form
https://www.sololearn.com/post/75089/?ref=app
+ 2
Its a project pre-created for the module of the python's course. the module's name is "Strings & variables"
+ 2
Okay, but without seeing the code I cannot tell where the assign error comes from.
I know which task you mean. I just thought you might want to additionally save in playground because you can better test it there.
+ 2
In python input() is used to input a string. To input other types of value you need to reassign the input ex. Int(input()) ,float(input()) ,eval(input()). The eval stands for evaluate, the program will process the user input and change to the most appropriate.
+ 2
X =int(input())
Y =int(input())
Z=x+y
Print(z)
+ 1
Write this:-
print(int(input())+int(input()))
+ 1
a = input("")
b = input("")
c = int(a)
d = int(b)
print(c+d)
+ 1
Just search python libraries bro. But ill search it myself for now. Don't you forget that nex step after understanding is learning stdanart library functions one by one.
+ 1
a = int(input())
b= int(input())
print(a+b)
0
Tashi N do you know that after a lesson there is practice? and ouch present that the course is divided into modules? good. at the end of the second Strings & Variables module there is a separate quiz called "END OF MODULE PROJECT Simple Calculator" I can't complete that quitz and i can't even share it.
0
Hi Simone,
You can copy your attempt, save it as public code snippet and link it here.
When we see your code, we can try to help you. But from your description only it is not clear what your code is like.
0
Hey Lisa
I cant do it
after many attempts I managed to share it
https://www.sololearn.com/coach/615?ref=app
0
Select all -> copy
Then go to your profile -> code bits
Tap "+" -> select python -> paste your code -> save it
But if it is a short code snippet, you probably can copy to your post here directly. :)
0
I did three attemps to solve it
1
a = 3
a += 6
b = 11
b +=22
print (a)
2
a = 3
a += 6
b = 11
b +=22
print (a)
print (b)
3
a = 3
a += 6
b = 11
b +=22
print (a)
print (b)
0
Ok thanks
0
No it doesnt function
because if i add an user input it dont insert the user's number
0
a = input()
b = input()
?
0
Yes ok but don't let me enter the numbers