Professional Documents
Culture Documents
assesment questions python
assesment questions python
1. Assign the value 5 to a variable called num and print its value.
10. Assign a dictionary with the keys "name" and "age" and their
respective values "John" and 25 to a variable called person_info
and print it.
11. . Assign the result of multiplying all numbers from 1 to 5
(inclusive) to a variable called `factorial` and print it.
14. . Assign the value of the expression "Python" not in ["Java", "C++",
"Python"] to a variable called `language_not_found` and print it.
15. Assign a list containing the lengths of strings in the list ["apple",
"banana", "orange", "kiwi"] to a variable called `string_lengths` and
print it.
19. Assign a list containing unique elements from the list [1, 2, 2, 3, 4,
4, 5] to a variable called `unique_elements` and print it.