+ 7

It says I need parentheses and I'm not sure where. It's the finance question

# Asks the user to enter the savings savings = input() # Convert the user input into a float value and update the variable savings = float(savings) # Savings grow after 1 year at a 5% annual interest rate balance = savings * 1.05 # Convert the balance into a string and update the variable balance = str(balance) # Concatenate the 2 strings to produce a message message = "Amount in 1 year: " balance # Display the message print(message)

5th Jun 2023, 4:31 PM
Andrew Schaub
Andrew Schaub - avatar
28 ответов
+ 9
message assignment missing concatenation of string at rhs side message = "Amount in 1 year: "+ balance
5th Jun 2023, 4:40 PM
Jayakrishna 🇮🇳
+ 5
Can't find it with that details..! Others can't open in the middle of a lesson, if they not completed. Am not done new courses yet. Lesson navigation details or Link or full description may help to understand.
5th Jun 2023, 5:15 PM
Jayakrishna 🇮🇳
+ 5
The last posted code of yours have no errors. But only not meeting the expected output. We can only tell, if we know the complete task. You can take screen shot and upload to feed post. Then share link here or just inform. No other ways, we can help i think, so all just guesses only..
6th Jun 2023, 4:54 AM
Jayakrishna 🇮🇳
+ 3
Try again means? Wrong output or error? Do check expected output with your output...
5th Jun 2023, 4:46 PM
Jayakrishna 🇮🇳
+ 3
"result with no error "? What result? Can you post, what is the task actually? Description?
5th Jun 2023, 5:06 PM
Jayakrishna 🇮🇳
+ 2
I did that and now when I hit solve it just goes to the end and says try again
5th Jun 2023, 4:43 PM
Andrew Schaub
Andrew Schaub - avatar
+ 2
It's almost impossible to find a problem by course and section on this platform to begin with, and Python is especially bad right now because they recently updated the course without changing where the completed course links point. So it's literally impossible (as far as I can tell) for someone who has previously completed the course to even look at the new questions. All of which is to say: if you want help, you're going to need to copy the full problem text for us.
5th Jun 2023, 5:31 PM
Orin Cook
Orin Cook - avatar
+ 2
I think the output must be exactly as expected, even a space or colon ( : ) may cause failure. For example if it expects output to be: amount in 1 year 157.5 and your output is: Amount in 1 year:157.5 then it may not be accepted.
5th Jun 2023, 6:13 PM
Artin Azari
Artin Azari - avatar
+ 2
So what it telling you..? Still not clear.. Is those are hidden test cases, not passing? See, also you are using capital A in Amount, but expected output you mentioned having small a as amount. Seems that, it is not full description. If possible, try to show screen shots of description and result...
5th Jun 2023, 6:54 PM
Jayakrishna 🇮🇳
+ 2
#savings = input() savings = 150 savings = 250 savings = float(150) savings = float(250) balance = 150.0 * 1.05 balance = 250.0 * 1.05 balance = 157.5 balance = 262.5 balance = str(balance) message = "Amount in 1 year:" + "157.5" print (message) message = "Amount in 1 year:" + "210.0" print (message) message = "Amount in 1 year:" + "1050.0" print (message)
10th Jul 2023, 12:03 PM
FAHAD FARUK
FAHAD FARUK - avatar
+ 1
I don't have those options it gives me no error or anything just goes straight to the end and yeah. I emailed support about this. Thank you for trying
5th Jun 2023, 4:50 PM
Andrew Schaub
Andrew Schaub - avatar
+ 1
Almost certainly a typo somewhere then, at a minimum. Save the code as a code bit, make it public, and post a link here so we can help further.
5th Jun 2023, 10:05 PM
Orin Cook
Orin Cook - avatar
+ 1
I got it, I needed a space after : which was weird. Thank you, everyone, for your help!
7th Jun 2023, 11:17 AM
Andrew Schaub
Andrew Schaub - avatar
0
# Asks the user to enter the savings savings = input() # Convert the user input into a float value and update the variable savings = float(savings) # Savings grow after 1 year at a 5% annual interest rate balance = savings * 1.05 # Convert the balance into a string and update the variable balance = str(balance) # Concatenate the 2 strings to produce a message message = "Amount in 1 year:" + balance # Display the message print(message)
5th Jun 2023, 4:53 PM
Andrew Schaub
Andrew Schaub - avatar
0
That is the code I'm trying to run and I hit run and just takes me to results with no error
5th Jun 2023, 4:54 PM
Andrew Schaub
Andrew Schaub - avatar
0
It's the section working with data finance app.
5th Jun 2023, 5:10 PM
Andrew Schaub
Andrew Schaub - avatar
0
It's introduction to python I can't link anything here. I have the section name and lesson. If you can't find it or haven't got that far then idk
5th Jun 2023, 5:18 PM
Andrew Schaub
Andrew Schaub - avatar
0
You are developing a finance app that helps users grow their savings Task Complete the code that take the savings, calculate the end amount, then display a message on screen Input example......input output Savings=150......amount in 1 year 157.5 Savings=250......amount in 1 year 262.5
5th Jun 2023, 5:49 PM
Andrew Schaub
Andrew Schaub - avatar
0
Correct, I've been seeing if I made any of those errors. I'd hope it would tell me, but it doesn't.
5th Jun 2023, 6:14 PM
Andrew Schaub
Andrew Schaub - avatar
0
Sadly I'm unable to post screenshots in here or I would have already done that. Unless I'm missing how to.
5th Jun 2023, 7:02 PM
Andrew Schaub
Andrew Schaub - avatar