Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How i can judge my code
#11
(Oct-02-2019, 04:48 PM)jefsummers Wrote: Some language barrier so we are guessing. Do you want: 1. A list of the digits, 1 or 0, from the source string 2. A list of OK or NG depending on whether the source string has 1 or 0 3. Two lists, with the positions of the 1s and 0s. Which, or if you can rephrase the question and do not use the word judge - that is causing confusion


sorry to make you confuse I just want to write the code can let me get ok on 1 or ng on 0
How i can use a simple way to write the code and not use complex way

(Oct-02-2019, 04:48 PM)jefsummers Wrote: Some language barrier so we are guessing. Do you want: 1. A list of the digits, 1 or 0, from the source string 2. A list of OK or NG depending on whether the source string has 1 or 0 3. Two lists, with the positions of the 1s and 0s. Which, or if you can rephrase the question and do not use the word judge - that is causing confusion
Sorry to make confuse

1.when mystring first position is 1 and I will print 1 or ok else I will print o or ng
2.mystring total have 32 digit I want write a code to make sure single position 1 is reply ok else position 0 is ng
3 base on my string 32 digit I total will get ok 11time cause I have 11 once 1 and 22 ng cause I have 22 once 0
4 i want my out put is get ok*11 ng*22 or 1111111111000000000000000000000
Reply


Messages In This Thread
How i can judge my code - by christing - Oct-02-2019, 04:16 AM
RE: How i can judge my code - by buran - Oct-02-2019, 06:02 AM
RE: How i can judge my code - by christing - Oct-02-2019, 09:20 AM
RE: How i can judge my code - by CoderMan - Oct-02-2019, 09:24 AM
RE: How i can judge my code - by christing - Oct-02-2019, 12:32 PM
RE: How i can judge my code - by SheeppOSU - Oct-02-2019, 12:39 PM
RE: How i can judge my code - by christing - Oct-02-2019, 01:53 PM
RE: How i can judge my code - by ichabod801 - Oct-02-2019, 03:16 PM
RE: How i can judge my code - by christing - Oct-02-2019, 04:11 PM
RE: How i can judge my code - by jefsummers - Oct-02-2019, 04:48 PM
RE: How i can judge my code - by christing - Oct-02-2019, 05:50 PM
RE: How i can judge my code - by newbieAuggie2019 - Oct-02-2019, 06:33 PM
RE: How i can judge my code - by christing - Oct-03-2019, 09:38 AM
RE: How i can judge my code - by newbieAuggie2019 - Oct-03-2019, 02:23 PM
RE: How i can judge my code - by buran - Oct-02-2019, 06:46 PM
RE: How i can judge my code - by christing - Oct-03-2019, 12:33 AM
RE: How i can judge my code - by burningkrome - Oct-03-2019, 11:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How can i judge 1st string position is correct number christing 3 2,534 Oct-30-2019, 03:32 AM
Last Post: newbieAuggie2019

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020