id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

makeInitialization


Make a program that writes a line of Python code. Given the name of the variable and its value, write an initialization of an int with that name and value. e.g. given the name "x" and the value "5", write "x: int = 5"


makeInitialization('x', 5) → 'x: int = 5'
makeInitialization('y', 10) → 'y: int = 10'
makeInitialization('z', 13) → 'z: int = 13'

...Save, Compile, Run (ctrl-enter)

def makeInitialization(name, value):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 115

Copyright Nick Parlante 2017 - privacy