Обсуждения
Hello guys right now I am kinda of new in python
my question is related to the function call len()
len() its print out the character but here it's the confusing part, I am working with a list let me explain an example
players
['lee', 'bob', 'moe', 'joe']
len(players)
4
why it's giving me 4 item in the list I thought len it counts the characters and if I do this it give me the correct somewhat answer what I am seeking,
len(players [-1])
3
0 голосов
8 ответовdouble qoutes in python3
0 голосов
1 ответCan anyone help me to code this
Write a method 'timesTable()' which accepts an integer value num from the keyboard and uses it to print 'times table' of itself in a structured format. Your output must include a header row. For example, if the user enters 5, your program's output should be:
5 Times Table
1 5 5
2 5 10
3 5 15
4 5 20
5 5 25
6 5 30
0 голосов
5 ответовPrinting pattern with Javascript
0 голосов
1 ответYou shall write a program that reads, from standard input, an arbitrary number of case-insensitive card descriptions, the totality of which shall be considered a hand. When standard input is exhausted, the program shall print one line to standard output describing the value of the hand. The program shall generate no other output.
0 голосов
3 ответовHow do I make this work?
0 голосов
2 ответовJava programming loop statements
0 голосов
2 ответовAssign each track runner a roster number and calculate the average age of the team.
As output the program should print the roster in three columns like in the following format:
Roster # Name Age
1 First Name 18
2 Second Name 19
3 Third Name 19
4 Fourth Name 20
5 Fifth Name 18
The average age of the team is 18.80.
-1 голос
1 ответAssign each track runner a roster number and calculate the average age of the team.
As output the program should print the roster in three columns like in the following format:
Roster # Name Age
1 First Name 18
2 Second Name 19
3 Third Name 19
4 Fourth Name 20
5 Fifth Name 18
The average age of the team is 18.80.
0 голосов
1 ответ