BaşlayınÜcretsiz Başlayın

Recapping built-in functions

In the video, Hugo briefly examined the return behavior of the built-in functions print() and str(). Here, you will use both functions and examine their return values. A variable x has been preloaded for this exercise. Run the code below in the console. Pay close attention to the results to answer the question that follows.

  • Assign str(x) to a variable y1: y1 = str(x)
  • Assign print(x) to a variable y2: y2 = print(x)
  • Check the types of the variables x, y1, and y2.

What are the types of x, y1, and y2?

Bu egzersiz

Introduction to Functions in Python

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

İnteraktif egzersizlerimizden biriyle teoriyi pratiğe dökün

Egzersizi başlat