- 5

Print 'fb' from string "fooboo"

Without using inbuilt functions,indexing,slicing

24th Dec 2021, 1:07 PM
Silly 😜 Programmer
21 Respuestas
+ 5
Impossible ! print is inbuilt too
24th Dec 2021, 1:25 PM
Oma Falk
Oma Falk - avatar
+ 6
Another idea word="fooboo" a,b,c,d,e,f = word print(a,d,sep="")
25th Dec 2021, 7:44 AM
Oma Falk
Oma Falk - avatar
+ 2
Brian, Oma Falk In python 3 print() is no longer a part of the language (inbuilt), it is a function
25th Dec 2021, 3:53 AM
Steve
Steve - avatar
+ 1
Please show your code attempt!. Hint: use a for-loop
24th Dec 2021, 1:13 PM
Lisa
Lisa - avatar
+ 1
Delete all o
24th Dec 2021, 1:14 PM
Oma Falk
Oma Falk - avatar
+ 1
Revise the lessons on strings and control flow in Python Core course
24th Dec 2021, 1:17 PM
Lisa
Lisa - avatar
+ 1
Oma Falk replace is inbuilt function
24th Dec 2021, 1:18 PM
Silly 😜 Programmer
+ 1
Oma Falk read my question carefully
24th Dec 2021, 1:18 PM
Silly 😜 Programmer
+ 1
Oma Falk thank you
24th Dec 2021, 1:27 PM
Silly 😜 Programmer
+ 1
Shubham Gupta, my approach is worth reconsidering. It does not use indexing or slicing, and the sys module is imported from an external library. The sys.stdout.write() function is not inbuilt to the language like print(). Is there another, unpublished requirement?
24th Dec 2021, 8:17 PM
Brian
Brian - avatar
0
just use indexes.
24th Dec 2021, 1:15 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
0
Oma Falk but how
24th Dec 2021, 1:16 PM
Silly 😜 Programmer
0
Replace with ""
24th Dec 2021, 1:17 PM
Oma Falk
Oma Falk - avatar
0
Thank u all for solution
24th Dec 2021, 1:28 PM
Silly 😜 Programmer
0
If you may not use an inbuilt function then you must use an imported function to print. import sys . . sys.stdout.write(...) Fill in the dots with the rest of the code by using a for/in loop and an if statement.
24th Dec 2021, 2:07 PM
Brian
Brian - avatar
24th Dec 2021, 5:47 PM
Silly 😜 Programmer
0
Shubham Gupta I think your fooboo(1) code is disqualified because it uses array indexing and the built-in print() function.
24th Dec 2021, 5:50 PM
Brian
Brian - avatar
0
Brian then show me your code sir
24th Dec 2021, 5:51 PM
Silly 😜 Programmer
0
Okay, Shubham Gupta, I will reveal my idea. Let me know if this meets the requirements: import sys for c in "fooboo": if c!='o': sys.stdout.write(c)
24th Dec 2021, 5:57 PM
Brian
Brian - avatar
0
Brian No it not meets requirement you used built in module you have work more on it
24th Dec 2021, 6:02 PM
Silly 😜 Programmer