- 3
Help me with this program
You’re working on a search engine. Watch your back Google! The given code takes a text and a word as input and passes them to a function called search(). The search() function should return "Word found" if the word is present in the text, or "Word not found", if it’s not. Sample Input "This is awesome" "awesome" Sample Output Word found
8 ответов
+ 3
Marky Rian, why do you think these tasks are given to you?
+ 1
See the lesson about in operator
if "a" in "cat" blah blah...
+ 1
Mary Rian
s = n/2 (a + L)
where,
n = number of items
a = first number
L = last number
you can use this summation formula to calculate sum of numbers if you know the first and last number.
https://code.sololearn.com/c3g02DzI60aN/?ref=app
0
It's difficult to understand this question
0
I am stuck at this line
If the word is present in the text ..........
I can not program this
0
Thanks alot I got it
0
I practiced and I solved it
- 1
Can you help me with this one also please
No one likes homework, but your math teacher has given you an assignment to find the sum of the first N numbers.
Let’s save some time by creating a program to do the calculation for you!
Take a number N as input and output the sum of all numbers from 1 to N (including N).
Sample Input
100
Sample Output
5050
Explanation: The sum of all numbers from 1 to 100 is equal to 5050.