0

Python introduction issues

Im on chatbot v1.0 and Im stuck. I understand the task however there are 3 case tests and I can only pass 1 without making the others incorrect. I cannot progress without completing this. I believe it could be a technical error?

15th May 2023, 9:50 AM
Jessie Miller
Jessie Miller - avatar
7 Answers
+ 6
Jessie Miller , to see what your issue is, we need to see your code. > put your code in playground, save it and post a link to it here.
15th May 2023, 10:02 AM
Lothar
Lothar - avatar
+ 6
Ausgrindtube , Jessie Miller , the task to solve in this exercise is: > input a name and store it in a variable > output the name this is the given *code* from sololearn: # Ask the user for input and store it in a variable name = # Display the user input on the screen > so we need the input() function for the first line > and the print() function for the second line.
7th Jun 2023, 10:47 AM
Lothar
Lothar - avatar
+ 4
I believe that you're doing what is called "hard coding". This is where you are writing a solution for 1 case only. Let's take a simple maths example: Make a program that adds 2 numbers. Case 1: a = 2, b = 2 Hardcode answer: print(4) Or print(2 + 2) This works for case 1, but not Case 2: a = 5, b = 8 You need to think of a way to write for all possible a's and b's. E.g. a = int(input()) b = int(input()) print(a + b) In order for us to help, can you please do what the following code says: https://code.sololearn.com/Wek0V1MyIR2r/?ref=app
15th May 2023, 11:31 AM
Ausgrindtube
Ausgrindtube - avatar
+ 3
Oluwafemi David , Jacinto Tejera GonzĂĄlez , it is better for you to start your own post, otherwise poeple will not get aware of you. please also include your current code in the post.
7th Jun 2023, 10:38 AM
Lothar
Lothar - avatar
+ 2
Thanks Lothar, let's see if we get the codes from the posters so we can help them.
7th Jun 2023, 12:01 PM
Ausgrindtube
Ausgrindtube - avatar
0
Hi i am also having this issues please cant get past it and i have been looking for a solution
7th Jun 2023, 9:00 AM
Oluwafemi David
Oluwafemi David - avatar