I'm not getting any output in the correct code (2nd code)? - python-3.x

Hi and thanks in advance for any help.
Here is the code that works with the proper output.
first_name="ada"
last_name="lovelace"
full_name=f"{first_name} {last_name}"
message=(f"Hello, {full_name.title()}!")
print(message)
Here is the similar code with no output...and I can't figure out why?
first_name="ada"
last_name="lovelace"
full_name=f"{first_name} {last_name}"
print(full_name)
I know it is correct coding based on the teacher's response but can't figure out why?
Thank you for any help!

You forgot to add .title() to your string formatting request.
You can do either:
# to get both capitalized add .title() twice here at "full name".
first_name="ada"
last_name="lovelace"
full_name=f"{first_name.title()} {last_name.title()}"
print(full_name)
or:
# to get both capitalized add .title() once here at "message".
first_name="ada"
last_name="lovelace"
full_name=f"{first_name} {last_name}"
message=(f"{full_name.title()}")
print(message)

Related

node.js how to put a enter

i am trying to code something in node.js but i don't know how to put a space for my log script:
Hook.info("Logger",`app: ${appopen}`)
what i want it to look like:
app: netflix
other app open: notepad
but i don't know how to put an enter so it looks like that.
so hopefully someone can help me with this!
also more information: im using https://jb3.github.io/webhook-discord/
Julien's answer should be correct. I can't yet comment but be sure that you're using backticks since those are what you need for template literals. It shouldn't be
Hook.info("Logger", "test \n ${appopen}"
but rather
Hook.info("Logger", `test \n ${appopen}`)
If you meant you wanted a carriage return at the end of the line then it should be
Hook.info("Logger", `test ${appopen}\n`)
You mean a Carriage Return, I guess. Try Hook.info("Logger", "\n")

Where can I find message for Update-Location-Request?

I hope you all doing well! I need message format for the Update Location request
Please check this screenshot this may be helped you
You should also take a look at the following specification: "ETSI TS 129 272" and check the ULR ABNF:

Tensorflow Object Detection API - Do something when an object is detected

Hi I'm currently searching for studies or tutorials where they used tensorflow API to do something (alarm, save video, print something, etc.) when a certain object is detected. I don't know if I'm bad at using google cause I can't seem to find what I want. Hope you guys can give me links regarding this. Thanks in advance :)
go into the visualize_utils.py in the utils folder under the current model directory and start tweaking with it.
if you want to tweak with perse print something if you detect an object whose label is already known, you may want to do the following under
def visualize_boxes_and_labels_on_image_array(.....):
Say if you want to print the current object to python command line modify the following section of above mention method as follows
else:
if not agnostic_mode:
if classes[i] in category_index.keys():
class_name = category_index[classes[i]]['name']
if (class_name == 'person'):
print(class_name + "Detected")
Please correct me / add upon to my answer ! Thanks and Welcome in advance!
The method draw_bounding_box_on_image - Line 131 which draws bounding box for each detected object. You can call another methods to manipulate the detected object etc. inside of draw_bounding_box_on_image method.
https://www.tensorflow.org/tutorials/
here you go
This will help i guess

Drupal 7 Search Module Increase snippet result

I want to increase my snippet result. When I'm going to print . It display few data from the content along with "..." 3 dots. Please help me to increase the snippet result.
Thanks
I found an answer. In your search-result.tpl.php file.
Try to find the value of your body from result array and mentioned in under node_load function. For ex:- node_load($result['node']->entity_id)->body['und'][0]['value'];
This will fetch all the results. :)

python str replace '\'

i'm new to python, i wrote script that query from db, and getting path looking like this:
...\\dev$\\AUTOMATION\\Logs\14-01-16_15-50-57_143
when i print the result i see that:
the \14
change to hexa- x0c
i want to access this link, in order to do so i need to add \ so the link will look like this:
...\\dev$\\AUTOMATION\\Logs\\14-01-16_15-50-57_143
I tried to os.path.dirname
re.find split and didnt get what i needed.
please i tried so many suggestions i saw in xda and non helped me.
Thanks,
Thanks for the response.
I know the escape , like: r'MyString', or \ when there is \
The problem is that i get the path from DB
and in the DB the path i receive is like this .. \AUTOMATION\Logs\15-01-16_15-50-57_143
and python load it immediately to x0c
I hope the problem sounds more clear..
Thnaks
When you print a string, you need to escape the backslashes with another backslash. \14 is getting read as a hex value, but \\14 will be printed correctly.

Resources