Python Strings
ورود به سیستم Google‎ تا تغییرات را ذخیره کنید. بیشتر بدانید
ایمیل *
Programme

What does the following Python Program print out?

str1 = "Hello"
str2 = 'there'
bob = str1 + str2
print(bob)
۱ امتیاز
پاک کردن انتخاب
What does the following Python program print out?
x = '40'
y = int(x) + 2
print(y)
۱ امتیاز
پاک کردن انتخاب
How would you use the index operator [] to print out the letter q from the following string?
x = 'From marquard@uct.ac.za'
۱ امتیاز
پاک کردن انتخاب
How would you use string slicing [:] to print out 'uct' from the following string?
x = 'From marquard@uct.ac.za'
۱ امتیاز
پاک کردن انتخاب
What is the iteration variable in the following Python code?
for letter in 'banana' :
    print(letter)
۱ امتیاز
پاک کردن انتخاب
What does the following Python code print out?
print(len('banana')*7)
۱ امتیاز
پاک کردن انتخاب
How would you print out the following variable in all upper case in Python?
greet = 'Hello Bob'
۱ امتیاز
پاک کردن انتخاب
Which of the following is not a valid string method in Python?
۱ امتیاز
پاک کردن انتخاب
What will the following Python code print out?

data = 'From stephen.marquard@uct.ac.za Sat Jan  5 09:14:16 2008'
pos = data.find('.')
print(data[pos:pos+3])
۱ امتیاز
پاک کردن انتخاب

Which of the following string methods removes whitespace from both the beginning and end of a string?

۱ امتیاز
پاک کردن انتخاب
ارائه
پاک کردن فرم
این فرم در Kalinga Institute of Social Sciences ایجاد شده بود. گزارش سوءاستفاده