- 1
Please I did help with practice 16.2 and 17.2
13 Respostas
+ 1
On 16.2 the question is asking for you to add the stars at the beginning and the end of the word
1.Create a variable and ask the user for the input.
2then print it out
x = input()
print("***" ,x, ***)
I have put some bit of errors for you to figure out.
and then 17.2
Create 2 variables ask the user for the input.
Then print the 2 variables in an order.
name=int(input())
years= int(input())
print(name,"is,year,"old)
There are errors in the codes just for you to figure them out
+ 1
Okay, no need for the int
0
What language and your attempt
0
Your attempt
0
I don't understand
0
Okay
0
From 16.2
We should have;
x = input()
print("*** " + x + " ***")
17.2
name = int(input())
age = int(input())
print(name + " is " + age + " years old")
0
Should I input anything inside the parenthesis?
0
16.2 is okay
17.2 is not okay
Here are the instructions of the problem
Now that we know how to take user input, let's improve our contact card program that we previously made using variables.
Change the given code to take the name and age from user input and use them in the output.
The input() function takes user input as a string.
Look at the last statement that says that the input function takes user input as a string. For this question. You don't need to convert the input to an interger
0
No need to put anything in the parenthesis.
0
Thank you
0
At 16.2 we can use like
x = input()
print("***",x,"***") #use double quotation at the end of the stars
On 17.2
is year can be double quoted
It can be written as print(name, " is " years, " old ")