Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python f string

import random
name = input("What is your name? ") #Gets needed input
value = int(input(f"Give random value, {name}: ")) # The {name} means it puts the variable name there
multiplier = random.randint(3, 6)
print("Now multiplying your value...")
complete_value = multiplier * value
print(f"Your value is... {complete_value}") # Same here with complete_value
Source by tutorial.eyehunts.com #
 
PREVIOUS NEXT
Tagged: #python #string
ADD COMMENT
Topic
Name
9+3 =