Quiz
Python *args and **kwargs Quiz
Some functions need to take any number of values: a log that records every reading, a launch that accepts optional settings, a helper that passes everything on to another function. In Python, *args…
Showing 61–70 of 86
Quiz
Some functions need to take any number of values: a log that records every reading, a launch that accepts optional settings, a helper that passes everything on to another function. In Python, *args…
Quiz
A return value is what a function hands back to the code that called it: the fuel left after a burn, whether a launch can go ahead, the lowest and highest reading from a sensor. This free quiz has 15…
Article Mini projects
…how to do it. Converting Decimal to Base 6 - Your Own Function The algorithm is straightforward: keep dividing the decimal number by 6 and collect the remainders. Those remainders, read in reverse…
Article Mini projects
…By the end of this mission, you'll have created a fully functional program with a graphical interface, perfect for keeping our space explorers in tip-top shape! Note : You can find the complete code…
Article Mini projects
…beginner Python programmer should be able to handle them. Functions for converting temperatures Let's define 2 functions necessary for our calculations. These will be the celsius_to_kelvin and…
Article Mini projects
…the Cosmic Dice Now comes the exciting part! Let's write a function that randomly selects our destination: def select_random_destination(): # Choose a random planet destination =…
Challenge
…the file back and print it, then add an append_entry() function that adds lines at the end without wiping what is there.
Example
…and end let you control separator and line ending in print function.
Article Python Fundamentals
…signal_data = 3 + 4j # Complex number representation wave_function = 2.5 + 1.8j # Used in quantum physics calculations antenna_impedance = complex(100, 20) # Creating from real and imaginary parts…
Quiz
…from variables and strings to lists, dictionaries and functions. For each piece of code you decide which error it raises, read the message, or choose the fix. What the quiz covers NameError and…