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

Help me please i really need it​
the planets eccentricity in order least to greatest​
A trash barge is dumped into a marine ecosystem. The trash is primarily composed of old car parts and lead tire weights. Which example of aquatic life would be
if you eat a food that contains a large dose of thiamin and riboflavin, what will most likely happen to the thiamin and riboflavin?
destrezas motoras en relación con la higiene y la salud integral wikipedia
solve the following using completing the square method :1. 10x² - 13x - 3 = 02. x² - 2x + 1 = 0​​
give me your opinion and no short answers please :) 1. do you normally have free time during the week? why?/why not? 2. is traveling a waste of time? why?/why n
uctions If Jackie mows 25 lawns in the month of April, how much money will she earn? Enter your text here
Question 7 how do i solve this, it wants explicit formula
where is new york city