+ 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)
28 ответов
+ 9
message assignment missing concatenation of string at rhs side
message = "Amount in 1 year: "+ balance
+ 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.
+ 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..
+ 3
Try again means? Wrong output or error?
Do check expected output with your output...
+ 3
"result with no error "? What result?
Can you post, what is the task actually? Description?
+ 2
I did that and now when I hit solve it just goes to the end and says try again
+ 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.
+ 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.
+ 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...
+ 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)
+ 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
+ 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.
+ 1
I got it, I needed a space after : which was weird. Thank you, everyone, for your help!
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)
0
That is the code I'm trying to run and I hit run and just takes me to results with no error
0
It's the section working with data finance app.
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
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
0
Correct, I've been seeing if I made any of those errors. I'd hope it would tell me, but it doesn't.
0
Sadly I'm unable to post screenshots in here or I would have already done that. Unless I'm missing how to.