diya10900
Badges: 4
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#1
Report Thread starter 1 week ago
#1
Can someone please help me. I am typing this code but it keeps on giving me an error and idk why
Attached files
Last edited by diya10900; 1 week ago
0
reply
degususaskulusku
Badges: 2
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#2
Report 1 week ago
#2
(Original post by diya10900)
Can someone please help me. I am typing this code but it keeps on giving me an error and idk why
you need another closing bracket on line 9
0
reply
Effyd123
Badges: 13
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#3
Report 1 week ago
#3
You haven't allocated a type to the inputs. Should be string name
1
reply
degususaskulusku
Badges: 2
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#4
Report 1 week ago
#4
(Original post by diya10900)
Can someone please help me. I am typing this code but it keeps on giving me an error and idk why
and you need to split line 9 into 2 lines effectively. It thinks you are taking in 2 inputs otherwise.Image
1
reply
notraheem
Badges: 3
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#5
Report 2 days ago
#5
print("Welcome to my Chat Bot")
name = input("What is your name? ")
print("Hello", name)

age = int(input("Hello " + name + " How old are you?")) # Didn't close brackets + concatenation error with inputs

print(name, "you are" , age , "years old. I'm 25.")
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Year 12s - where are you at with making decisions about university?

I’ve chosen my course and my university (19)
32.2%
I’ve chosen my course and shortlisted some universities (22)
37.29%
I’ve chosen my course, but not any universities (2)
3.39%
I’ve chosen my university, but not my course (3)
5.08%
I’ve shortlisted some universities, but not my course (4)
6.78%
I’m starting to consider my university options (7)
11.86%
I haven’t started thinking about university yet (1)
1.69%
I’m not planning on going to university (1)
1.69%

Watched Threads

View All