+ 2
Practice 17.2 help
Don’t understand what to do next. Cant get it to do both #1 and #2 correctly at the same time. Please help, thanks! https://sololearn.com/coach/1032/?ref=app
9 Réponses
+ 1
Zach Z
1 - don't print Hard Code value. Input will take care self.
2 - Don't convert age input value to int because we are concatenating with string.
+ 3
Remove or comment out these lines;
# name = "Dave"
# age = "22"
edit: also, either remove the int() around the input or convert age back to a str()
+ 2
Thanks 🅘🅜 🅰🅹 !!! and ChaoticDawg
+ 1
Zach Z
Show your code.
+ 1
You may want to be more specific. There is more than 1 practice 17.2 (just providing a link won't work). Also, you might want to describe the issue you're having and share your code so that people can actually help you.
0
sorry im new thought the link might take you there.
python for beginners - 17.2 practice - working with inputs
name = input()
age = int(input())
name = "Dave"
age = "22"
print(name + " is "+age+" years old")
when I add Anna and 63, the #2 inputs it just prints those and then says #1 is wrong. wont let me pass it.
thanks for the help!
0
I dont know how to make this puzzle work.
0
I can get test case #1 to work or #2, not both
0
Just create input() for name and age. Don't write there any kind of names like Anna or Dave.
It will work , copy text bellow:
name = input()
age = input()
print(name + " is "+age+" years old")