- 1

Please I did help with practice 16.2 and 17.2

1st Nov 2021, 9:02 PM
Blessing Ezinne
Blessing Ezinne - avatar
13 odpowiedzi
+ 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
1st Nov 2021, 9:21 PM
MATOVU CALEB
MATOVU CALEB - avatar
+ 1
Okay, no need for the int
1st Nov 2021, 10:02 PM
Blessing Ezinne
Blessing Ezinne - avatar
0
What language and your attempt
1st Nov 2021, 9:06 PM
MATOVU CALEB
MATOVU CALEB - avatar
1st Nov 2021, 9:09 PM
Blessing Ezinne
Blessing Ezinne - avatar
0
Your attempt
1st Nov 2021, 9:10 PM
MATOVU CALEB
MATOVU CALEB - avatar
0
I don't understand
1st Nov 2021, 9:11 PM
Blessing Ezinne
Blessing Ezinne - avatar
0
Okay
1st Nov 2021, 9:22 PM
Blessing Ezinne
Blessing Ezinne - avatar
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")
1st Nov 2021, 9:28 PM
Blessing Ezinne
Blessing Ezinne - avatar
0
Should I input anything inside the parenthesis?
1st Nov 2021, 9:28 PM
Blessing Ezinne
Blessing Ezinne - avatar
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
1st Nov 2021, 9:39 PM
MATOVU CALEB
MATOVU CALEB - avatar
0
No need to put anything in the parenthesis.
1st Nov 2021, 9:59 PM
MATOVU CALEB
MATOVU CALEB - avatar
0
Thank you
1st Nov 2021, 10:02 PM
Blessing Ezinne
Blessing Ezinne - avatar
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 ")
3rd Nov 2021, 3:34 PM
Simply Sathish