
Menghasilkan segmen kod menggunakan fungsi input dan output

Quiz
•
Computers
•
12th Grade
•
Medium
Haezah Haezah
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apakah fungsi input() dalam Python?
Memaparkan teks ke skrin
Mendapatkan data daripada pengguna
Menyimpan data dalam fail
Menulis data ke skrin
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Fungsi manakah yang digunakan untuk memaparkan teks kepada pengguna?
show()
print()
display()
output()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apakah output berikut jika kod ini dijalankan dan pengguna memasukkan "Ali"?
nama = input("Masukkan nama anda: ")
print("Hello,", nama)
Program tidak memaparkan apa-apa
Hello, Ali
Hello, nama
Program error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Jika input yang perlu dimasukkan adalah nombor bulat, apakah jenis data yang perlu digunakan dalam fungsi input() di Python?
Menggunakan fungsi str()
Menggunakan fungsi int()
Menggunakan fungsi float()
Terus guna tanpa ubah apa-apa
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kod manakah betul untuk menjumlah dua nombor yang dimasukkan oleh pengguna?
a = input("Num 1: ")
b = input("Num 2: ")
print(a + b)
a = int(input("Num 1: "))
b = int(input("Num 2: "))
print(a + b)
print(input("Num 1: ") + input("Num 2: "))
a = int(input("Num 1: ")) b = input("Num 2: ") print(a + b)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa output kod ini jika pengguna masukkan nombor 5 dan 3?
x = int(input())
y = int(input())
print("Jumlah:", x + y)
Jumlah: 8
Jumlah: 53
Jumlah: x + y
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apakah jenis data yang dihasilkan oleh fungsi input()?
Integer
Float
String
Boolean
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Python Assessment 1 - MTs Ibnu Taimiyah

Quiz
•
9th - 12th Grade
10 questions
THỰC HÀNH SỐ 1

Quiz
•
12th Grade
12 questions
Թեմատիկ-9-2 Python

Quiz
•
12th Grade
8 questions
Podstawy pythona

Quiz
•
7th - 12th Grade
15 questions
Python - тест

Quiz
•
1st - 12th Grade
10 questions
Python- Operators

Quiz
•
12th Grade
15 questions
Java Script Quiz

Quiz
•
9th - 12th Grade
15 questions
Repaso de Python

Quiz
•
5th Grade - Professio...
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade