“f String” Kod odpowiedzi

frty f

var = 1
print(f'number {var}')
A DG

f String

# f string
name = 'John'
age = 43
st = f"Hello my name is {name}, I am {age} years old."
print(st) 
Impossible Impala

f String w Python

# Ques.1
num = int(input("Enter your number: "))

for i in range(1, 11):
    # print(str(num) + " × " + str(i) + " = " + str(i*num))
    # you can't add variables
    
    print(f"{num} × {i} = {num*i}")
    # you can add variables
Xinov10

Odpowiedzi podobne do “f String”

Pytania podobne do “f String”

Więcej pokrewnych odpowiedzi na “f String” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu