What does the program below display?full_name = "Jane"full_name = full_name + "Brown"print( full_name )*
Question
What does the program below display?full_name = "Jane"full_name = full_name + "Brown"print( full_name )*
Solution
The program will display "JaneBrown".
Here's the step by step explanation:
- The variable
full_nameis initially assigned the value "Jane". - Then,
full_nameis reassigned a new value which is the old value offull_name("Jane") concatenated with "Brown". So,full_namenow becomes "JaneBrown". - Finally,
print(full_name)displays the value offull_namewhich is "JaneBrown".
Similar Questions
What is the output of the following program?c = ['code', 'tantra']for t in c: t.upper()print(c)Options['code', 'tantra']CODE['CODE' , 'TANTRA']TANTRA
Consider the following text from a Python interpreter.>>> print(2 + 2)4What is the text "print" called?Question 10Select one:a.a functionb.an operatorc.a promptd.a statemente.a value
What is the output of the following code?1178910345612print('Mike')else: print('Stop') if(x=="Go"): print('Go ') x="Go" 1 pointGo MikeMikeStop Mike
What does this command line print?>>> a = "Hello, world!">>> print(a[:5])orld!Helloworld!I don't know
What will be the output of the following code?Name = ‘saif’print(type(Name))Options: Pick one correct answer from belowintstrcomplexNone of the above
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.