Q&A Discussões
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 Voto
8 RespostasPython
0 Voto
1 RespostaCan 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 Voto
5 RespostasYou 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 Voto
3 RespostasAssign 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 Voto
1 RespostaAssign 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 Voto
1 Resposta2
-6 Votos
2 RespostasQuente hoje
Sticky position
2 Votes
Help please?
3 Votes
Online voting system
2 Votes
Ejercicio Pytho
0 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes
Game development
0 Votes