Quiz String, Text Files, Exception

Quiz String, Text Files, Exception

University

10 Qs

quiz-placeholder

Similar activities

Python

Python

University

8 Qs

Python Sets

Python Sets

University

10 Qs

basic programming quiz

basic programming quiz

University

10 Qs

Quiz MS. Word 2023

Quiz MS. Word 2023

University

10 Qs

Asesmen Pengetahuan Mengenal Microsoft PowerPoint

Asesmen Pengetahuan Mengenal Microsoft PowerPoint

University

10 Qs

php file handling

php file handling

University

10 Qs

Python

Python

University

13 Qs

Python Quiz

Python Quiz

University

12 Qs

Quiz String, Text Files, Exception

Quiz String, Text Files, Exception

Assessment

Quiz

Computers

University

Medium

Created by

Syifa Nurhayati

Used 1+ times

FREE Resource

AI

Enhance your content

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

10 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

x = "apple"

Mana saja pilihan yang akan mencetak huruf p?

print(x[2])

print(x[1])

print(x[-1])

print(x[-2])

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image


Angka terakhir yang dicetak program tersebut adalah...

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

a = "one"

b = "two"

print((a+b+a)*1) akan menghasilkan output...

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

print("{2}-{0}-{1}".format('September', 21, 2022))

21-September-2022

September-21-2022

2022-September-21

Syntax Error

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Agar tercetak output seperti pada gambar, kode yang tepat adalah ...

print(f"{judul:.>50d}{halaman:.<5d}")

print(f"{judul:.<50s}{halaman:.>5d}")

print(f"{judul:.<50d}{halaman:.>5f}")

print(f"{judul:.>50s}{halaman:.<5d}")

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Method yang akan mengembalikan setiap baris menjadi elemen dalam list adalah ...

read()

open()

readline()

readlines()

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Untuk membaca kata "Semangat" apa yang harus dilakukan?

file = open('pesan.txt', "r")

file.read(8)

file.read(7)

file.read(0,7)

file.read([0:7])

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?