You are not logged in. Please login at www.codechef.com to post your questions!

×

Beginner/NITIKA - python 3.5 - need some help

Hello guys! Could you please tell me what's wrong with my code? It looks to work well, but CodeChef says my answer is wrong.Thanks!

My solution / Problem link

asked 22 Nov '17, 23:10

nowakowskip's gravatar image

0★nowakowskip
52
accept rate: 0%


In the last name, all the letters except first should be lower case. You have printed them the same as input.

lastname[1:] -> lastname[1:].lower()

link

answered 23 Nov '17, 00:36

gomu's gravatar image

4★gomu
2084
accept rate: 5%

Thanks a million!

(23 Nov '17, 03:54) nowakowskip0★
1

Or you can do it more pythonic way.
Instead of lastname[0].upper(),lastname[1:].lower()
you can do lastname.capitalize()

(23 Nov '17, 09:27) lordshiva19965★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×431
×354
×280
×4

question asked: 22 Nov '17, 23:10

question was seen: 207 times

last updated: 23 Nov '17, 09:27