0
Python Variables 16.2
I need help.... I am able to pass 16.2 Test Case 1 but when I go to Test Case 2 and enter the correct code. Test Case 1 is now wrong. I have been trying to solve this for the past 2 weeks. Any advice would be greatly appreciated. https://www.sololearn.com/learning/1157
4 odpowiedzi
+ 3
Pls edit your question description with:
1. Task description
2. Link to your code in Code Playground
3. Explanation of your difficulties
So we can see what you need help in.
+ 1
Alex Pay attention to the spacing before and after the stars.
You need a space in the quotes.
print("***" +""+ text +""+ "***")
output: ***text***
print("*** " +""+ text +""+ " ***")
output: *** text ***
This also works.
print("*** "+text+" ***")
0
16.2 Task 1 Expected Output *** hello ***
My Code for Task 1
text = input()
print( "***" + " " + "hello" + " " + "***" )
16.2 Task 2 Expected Output *** python is awesome ***
My Code for Task 2
text = input()
print( "***" + " " + "python is awesome" + " " + "***" )
When I enter the Task 1, I get the correct answers, but when moving on to Task 2 and enter the code. Task 2 comes up correct but now Task 1 is wrong and I cannot proceed to Task 3.
0
Something is confusing. The question title mentions variables and the codes have inputs, but these inputs and variables are used nowhere. The tasks seem different, but use the same code.
Could you pls advance on my previous comment?
Describe the tasks as they are. I can bet something is missing.
Link your code from Code Playground using "+" button. This way, we all talk over the same code.
Also, pls do this in the question description. This information scattered in comments soon gets hard to follow.