Python - palindrom, tekst, do zadań losowych

Python - palindrom, tekst, do zadań losowych

9th Grade

13 Qs

quiz-placeholder

Similar activities

LA1.C1: Introduction to Small Basic

LA1.C1: Introduction to Small Basic

9th Grade

15 Qs

9.2 Physical computing Lesson 2 starter

9.2 Physical computing Lesson 2 starter

9th Grade

8 Qs

Data Representation - Keywords

Data Representation - Keywords

9th - 11th Grade

12 Qs

Kiến thức về trang tính

Kiến thức về trang tính

7th Grade - University

17 Qs

Pemrograman

Pemrograman

9th - 12th Grade

15 Qs

Computer Languages

Computer Languages

6th - 12th Grade

10 Qs

HTML -znaczniki 1

HTML -znaczniki 1

7th Grade - University

15 Qs

Creating Database Tables

Creating Database Tables

8th - 10th Grade

10 Qs

Python - palindrom, tekst, do zadań losowych

Python - palindrom, tekst, do zadań losowych

Assessment

Quiz

Computers

9th Grade

Practice Problem

Medium

Created by

KP KP

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

13 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

Aby zamienić liczbę dziesiętną na binarną użyjesz funkcji:

2.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

Aby zamienić liczbę dziesiętną na szesnastkową użyjesz funkcji:

3.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

Aby zamienić liczbę dziesiętną na ósemkową użyjesz funkcji:

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Aby wypisać pierwszą literę zmiennej nazwisko:

nazwisko = "Rossum"

print(nazwisko[-1])

print(nazwisko[0])

print(nazwisko[:1])

print(nazwisko[1:])

Answer explanation

To print the first letter of the variable 'nazwisko', use print(nazwisko[0]). This will access the first character 'R' in the string 'Rossum'.

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Aby wypisać ostatnią literę zmiennej nazwisko:

nazwisko = "Rossum"

print(nazwisko[-1])

print(nazwisko[0])

print(nazwisko[:1])

print(nazwisko[1:])

Answer explanation

To print the last letter of the variable 'nazwisko', use 'print(nazwisko[-1])'. This will access the last character in the string 'Rossum'.

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Aby wypisać pierwszych 5 znaków zmiennej nazwisko:

nazwisko = "Guido van Rossum"

wybierz wszystkie poprawne

print(nazwisko[:-1])

print(nazwisko[5:])

print(nazwisko[0:5])

print(nazwisko[:5])

Answer explanation

To print the first 5 characters of the variable 'nazwisko', you can use print(nazwisko[0:5]) or print(nazwisko[:5]). These slices will output 'Guido'.

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Aby wypisać nazwisko od końca:

nazwisko = "Guido van Rossum"

print(nazwisko[::-1])

print(nazwisko[:-1])

print(nazwisko[-1:])

print(nazwisko[:-1])

Answer explanation

The correct choice is print(nazwisko[::-1]) because using the slicing syntax [::-1] allows us to reverse the string 'Guido van Rossum'.

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?