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

 

lowellastroclub@gmail.com > return42
prev  |  next  |  chance

Welcome to the very first DESI High Python Crash Course lesson! You may notice that the box below contains the text "def return42():" and we will get into what this means later. One of the most important uses of Python is "returning" a value, which is the computer's way of "submitting" a result to be used later (usually after performing a series of operations). Let's give it a shot! Underneath the first line in the box of code below, write a statement that will return the value 42. Note: In Python, you can return a value by writing "return [something]" (e.g., "return 1" would return the value 1.)


return42() → 42

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

def return42():

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

Copyright Nick Parlante 2017 - privacy