Ask coding questions

← Back to all posts
i need help
Alicat (3)

hi i need help with this thank you if you could help me thAT WOULD BE AWSON

chonkybitz (2)

You can take in the data immediately to a variable by changing the structure slightly.

fname = input('Enter name: ')
sname = input('Enter surname: ')
age = int(input('Enter age: ')) # will throw an error if not integer

print('Hello, {}. Your surname is {} and your age is {}.'.format(fname, sname, age))
legocjones (2)

print ("What is you name")
firstname = input()
print ("hello,",firstname)
print ("What is your surname")
surname = input ()
print ("your surname is,",surname)
print ("hello,",firstname,surname)
print("What is your age?")
age = int(input())
print("your age is", age)

jbryden (0)

this should neating it up a bit

firstname = input("What is you name")
print ("hello",firstname)
surname = input ("What is your surname")
print ("your surname is",surname)
print ("hello",firstname,surname)

AmirOcuzz (0)

What do you need help with?

x9 (2)

change line 5 from
surname = input ()
to surname = input()

AveryBanks (0)

age = input("What is your age?")

erogers91 (0)

Have you tried:

print ("What is your age?")
age = input ()
print ('Your age is,',age, "!")```
Alicat (3)


ChiselD1 (0)

@Alicat What have you tried so far? Can you start by giving it a shot on your own? You learn a lot better that way, and then we can see what's going wrong and help you out.


@Alicat use an int or you can try printing your age as a string

west (1)

@Alicat You should be able to do this on your own based on what you already have. If you encounter a specific issue or do not understand why something produces a specific unexpected behavior try posting that.