autumnnicole36582
autumnnicole36582 autumnnicole36582
  • 03-03-2021
  • Computers and Technology
contestada

How do you think we could print a sentence that uses a variable along with other text (ie: “My name is Joe” where ‘Joe’ is a variable called name.)

Respuesta :

60002135330 60002135330
  • 03-03-2021

This is for Python

name = 'Joe'

print(f'My name is {name}')

This is called string formatting. Using f before the text. This is another way

name = 'Joe'

print('My name is', Joe)

But I found that string formatting is cleaner and much more useful

Answer Link

Otras preguntas

Ark invest estimates value of each us digital wallet user at $19,900 by 2025. assume value of latoken international client will be $1000 in 2027 and number of m
PLEASE HELP ASAP I WILL GIVE BRAINLIEST 7.09 Module Project Step 1: Determine Your Position Decide whether you will defend or reject the following statement: “
A population of 20,000 individuals is surveyed and found to be composed of 9,800 individuals with blond hair and 10,200 with brown hair. The allele for blond ha
The lack of affordable access to sufficient quality and quantity of healthy food is known as ______.
You have two buffered solutions. Buffered solution 1 consists of 5.0 M HOAc and 5.0 M NaOAc; buffered solution 2 is made of 0.050 M HOAc and 0.050 M NaOAc. How
In which country did monteverdi live and work?
Relative to body size, primate brain size is Group of answer choices proportional to human brain size. larger among great apes than among other primates. smalle
A new sort of ________ is emerging online: communities developing around common interests or shared identities.
PLEASE HELP ME ASAPP
all but which of the following can work against a viral infection