Python Coding

Pubblicato il: 29 luglio 2024
sul canale di: Work With Python
246
like

Python program to swap two variables

x = 5
y = 10

To take inputs from the user
#x = input('Enter value of x: ')
#y = input('Enter value of y: ')

create a temporary variable and swap the values
temp = x
x = y
y = temp

print('The value of x after swapping: {}'.format(x))
print('The value of y after swapping: {}'.format(y))


In questa pagina del sito puoi guardare il video online Python Coding della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Work With Python 29 luglio 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 246 volte e gli è piaciuto like spettatori. Buona visione!