Create a dictionary, mapping, with length 4, were keys are strings, and values are floats.
ⓘ
There is a string method capitalize which returns capitalized version of the string.
Write a function which takes a string as argument and returns the capitalized
version of the string.
ⓘ
Write a function that takes a dictionary and returns its length
ⓘ
There is a string method, lower, which returns lowercase version of the string.
Write a function, to_lower, which takes a string as argument and returns the lowercase
version of the string.
ⓘ
s1 = {1, 1, 1} s2 = set('pse')
Given the above script, what are the values of the following variables?
s1: | |
s2: |
Define a function that takes one list as argument and returns its first element.
ⓘ
population = {"Babrruja": 300, "Llukar": 100, "Carralluke": 50} population["babrruja"] = 301 population["Llukar"] = 250
Given the above script?
What is the final value of d: | |
What is the final number of elements of d: | |
What is the final value of "Babrruja": |
Define a function that takes one list as argument and returns its third element.
ⓘ
Complete execution flow of the following program
sentence = "I live here" print(sentence[2:6])
'live' >>>
Complete execution flow of the following program
fruit = "kiwi" for letter in fruit: print(letter)
'k' 'i' 'w' 'i' >>>