FullCircleTechUK
69 posts

FullCircleTechUK
@FullCTechUK
Programming, IT news and Computer Science
Entrou em Haziran 2021
1 Seguindo1 Seguidores

XOR continued...
Lets work with two numbers 3 and 2 and apply XOR to swap the numbers around.
x = 2 (010)
y =3 (011)
x = x XOR y 'Answer: 001
y = x XOR y 'Answer: 010
x = x XOR y 'Answer: 011
print x 'Displays 3
print y 'Displays 2
#coding #XOR #fullcircletechUk
English

Fav-films= ['iRobot', 'Speed']
Fav-films.append('Taken')
print(Fav-films)
-- --- -- --- -- -- -- --- -- -- --
['iRobot', 'Speed','Taken']
-- --- -- --- -- -- -- --- -- -- --
#Python
#pythonprogramming
#pythoncode
#pythonlearning
English

import time
numbers (2,4,6,8)
for x in numbers:
print (x)
time.sleep (1)
‐ - - - - - - - - - - - - - - - - - - - -
2
'Pause
4
'Pause
6
'Pause
8
'Pause
‐ - - - - - - - - - - - - - - - - - - - -
#pythonprogramming
#pythoncode
#python
#python試験
English

IsItRaining = input(' Y or N?')
Yanswer =('y','Y')
if IsItRaining in Yanswer:
print ('Welcome to the UK')
‐ - - - - - - - - - - - - - - - - - - -
Y or N ? y
Welcome to the UK
‐ - - - - - - - - - - - - - - - - - - -
#pythonprogramming
#pythoncode
#python
#python試験
English

numbers =[2,4,6,8]
for x in range (numbers):
print x
‐ - - - - - - - - - - - - - - - - - - - -
Error!
‐ - - - - - - - - - - - - - - - - - - - -
#pythonprogramming
#pythoncode
#python
#pythonError
#python試験
English

numbers =[2,4,6,8]
for x in numbers:
print x
‐ - - - - - - - - - - - - - - - - - - - -
Error!
‐ - - - - - - - - - - - - - - - - - - - -
#pythonprogramming
#pythoncode
#python
#pythonError
#python試験
English


