Q&A Discussões
I dont unserstand the output if this code :
# string formatting
nums = [4, 5, 6]
msg = "Numbers: {0} {0} {2}". format(nums[0], nums[1], nums[2])
print(msg)
4 4 6
but when I do :
# string formatting
nums = [4, 5, 6]
msg = "Numbers: {0} {0} {2}". format(nums[1], nums[1], nums[2])
print(msg)
it gives me
5 5 6
is there a priority in the Reading ?
0 Voto
5 Respostasabout size/resize, and measurements: when assigning width or height, px is often! how many px's are there per inch or per cm? for width, it is convenient, with some other measurements applicable, but for height? px's is rather imperceptible! I tried to attribute a certain height in my code, what is best: px, rows, number of lines or what?
1 Voto
3 Respostasabout svg. Q1: when setting up layout size, height & width, do we need an extra layout for some things different from the first layout. ie two layouts?
Q2: what is the purpose of the size? how does it affect graphics in it?
Q3: how to treat problem of over lapping or/and over ridding?
1 Voto
2 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 RespostasWhen Bongi's new baby, Sipho, was born,she opened a savings account woth R1000.00. On each daybitthday,starting with the first,the bank added 4.5% of the balnce and Bongi added another R500.00 to the account.Write a loop that will calculate how much money was in the account on Sipho's 18th birthday?
0 Voto
2 RespostasCSS The text-indent property I do not understand why you would use this when the </br> tag takes the text back to the left hand side of the page, and as soon as I start a new class the first line of text in a paragraph even with a class it imprints onto every other paragraph like it or not. Why is this please?
0 Voto
2 RespostasHey there,
I don't know why, but when I import tkinter on IDLE like this:
from tkinter import *
And I say:
window = Tk()
Even known I use python 3.2.5, which should be able to use Tkinter, the python shell raises a ValueError that says that Tk() is not defined. I am very sure I use python 3.2.5 and tutorials from the Python Foundation say that is what I have to do. But it still doesn't work.
Does anyone have an idea of how to solve this problem? Thank you!
0 Voto
3 RespostasWrite a program that uses a dynamic array that contains 5 items of double values. The size of the array is entered when the program is run. Aldo the 5 values must be entered. These tasks are done in the main ( ) function. Then write a function to display the 5 values. The function must have a pointer variable as a parameter. The function is called from the main ( ).
0 Voto
2 RespostasQuente hoje
Sticky position
2 Votes
Help please?
3 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes
Ejercicio Pytho
0 Votes
Game development
0 Votes