#1. Print a message print____"Hello, World!____) #2. Declare variables and print them ____ = "Sam" age ____ 30 print("Name:____, name) print("Age:", age____ #3. Take user input and display it user____name = input("Enter your name: "____ print("Hello,____, user_name #4. Check data types x = 10 y = 3.14 z = "Python" print(type(x)) # ____ print(type(y)) # ____ print(type(z)) # ____ #5. Simple addition a = ____ b = 7 sum____result = a ____ b print("Sum:____, sum_result) #6. Input two numbers and add them num1 = ____(input("Enter first number: ")) ____ = int(input("Enter second number: "____ print("Sum:", ____ + num2____ #7. Calculate area of a rectangle length = float____input("Enter length: "____ ____ = float(____("Enter width: ")) ____ = length ____ width #8. Convert string to integer num_str = ____100" num_int = int____ print("Converted number:", ____) #9. Simple arithmetic operations x = 10 y = 3 print("____:", x + y) print("____:", x - y) print("____:", x * y) print("____:", x / y) #10. Calculate average of three numbers a = float(input____"Enter first number: "____ b = float(input("Enter ____ number: ")) c = float(____("Enter third number: ")) average = (a + ____ + c) ____ 3 print("____:", average)
0%
Missing Python Code
แชร์
แชร์
แชร์
โดย
Nlat2273
KS4
Computing
แก้ไขเนื้อหา
สั่งพิมพ์
ฝัง
เพิ่มเติม
กำหนด
ลีดเดอร์บอร์ด
แสดงเพิ่มขึ้น
แสดงน้อยลง
ลีดเดอร์บอร์ดนี้ตอนนี้เป็นส่วนตัว คลิก
แชร์
เพื่อทำให้เป็นสาธารณะ
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานโดยเจ้าของทรัพยากร
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานเนื่องจากตัวเลือกของคุณแตกต่างสำหรับเจ้าของทรัพยากร
แปลงกลับตัวเลือก
เติมประโยคให้สมบูรณ์
เป็นแม่แบบแบบเปิดที่ไม่ได้สร้างคะแนนสำหรับลีดเดอร์บอร์ด
ต้องลงชื่อเข้าใช้
สไตล์ภาพ
แบบ อักษร
ต้องสมัครสมาชิก
ตัวเลือก
สลับแม่แบบ
แสดงทั้งหมด
รูปแบบเพิ่มเติมจะปรากฏเมื่อคุณเล่นกิจกรรม
เปิดผลลัพธ์
คัดลอกลิงค์
คิวอาร์โค้ด
ลบ
คืนค่าการบันทึกอัตโนมัติ:
ใช่ไหม