+ 2

Fill the results for the following statements.

Q1: word = 'a'+ 'b' print (word) #Output: Q2: print( +word*3 + !) # Output:

21st Sep 2020, 12:50 AM
Priya
Priya - avatar
8 Respostas
+ 7
word = 'a'+ 'b' print(word) print(word*3 +'!')
21st Sep 2020, 1:36 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 5
Your 1st code have syntex error You missed open round bracket. In second question it will also give error.if you will write like this word = 'a'+ 'b' print(word) print(word*3 +'!') Then Output will be ab ababab
21st Sep 2020, 1:12 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 5
Mam first you missed round bracket in first print statement second thing you wrote print(+word*3+!) What is ! Means it wont be add after calculate word*3 if u want to print exclamation mark then u have to write it on double quotes
21st Sep 2020, 1:27 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 5
Priya Singh see my first code i corrected it
21st Sep 2020, 1:32 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 5
But if I am copying and running it then error is coming.
21st Sep 2020, 1:35 AM
Priya
Priya - avatar
+ 5
Thanks a lot!
21st Sep 2020, 1:43 AM
Priya
Priya - avatar
+ 4
But i'm getting an error
21st Sep 2020, 1:24 AM
Priya
Priya - avatar
+ 4
Please write and give the code.
21st Sep 2020, 1:32 AM
Priya
Priya - avatar