Check your grade on D2l
You can request a regrade on Gradescope (DEMO)
Write a Python function that does the following:
greeting
first_name
and last_name
first_name
and last_name
Access the Python 3.11 documentation and read the definitions for print()
, round()
, input()
, len()
, int()
, float()
, str()
.
With your table members, write a short definition for each of the built-in functions above on a white board.
len()
functionlen()
function can be used with many types – we will be using it with string
for nowWrite a Python function that does the following:
count_characters
a
, b
and c
You have 10 minutes to complete the quiz.
Your formula in your function should be Python code (in other words, do not just copy the formula in the instructions, make it so it uses actual symbols for Python operators)
input()
functioninput()
function prompts the user to input text in the standard outputinput()
will be written to the standard output (without a trailing newline, which you can add using \n
).input()
always returns a stringint()
functionint()
function can be used to convert a string to an integer typefloat()
functionfloat()
function can be used to convert a string to a float typeWrite a Python function that does the following:
calculate_year_born
, with no parametersinput()
input()
always returns a string)age
was born by subtracting age
from 2024
age
was born