python

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

what is input and output

in Python, input refers to data received from the user or another source, while output is the data sent to the user or another destination. Together, they enable interaction with the program, allowing users to provide information and receive results. Input can be gathered using functions like input(), while output can be displayed using print(). These concepts are fundamental for developing interactive applications. Input allows user data entry, while output displays results. Input and output are essential concepts in Python programming that facilitate user interaction by allowing programs to receive data and display results.Input allows data entry, while output displays results to users, enabling interaction. Input and output in Python refer to data received from users or sources and data sent to users or destinations, respectively, enabling user interaction.

https://www.bbc.co.uk/bitesize/topics/zkcqn39/watch/zwtsvcw

2
New cards

what are while loops

while loops (conditional loops)
number=1

while number <5:

print(number)

number= number+1

the loop will continue until a condition is met

3
New cards

what are for loops

for loops

for I in range (5):

print (“hello world”)



for I range (1,5):

print i

for I in (clothes):
print i

will print 5 times

you can specify the range

print items in a collection

4
New cards

what are variables

creating a variable

celsius = 25 

using a variable

celsius*9/5 +32 

5
New cards

what is a string(str)

any alphanumeric character e.g. “abcd12345” or “hello”

6
New cards

what is an interger(int)

whole numbers e.g.5

7
New cards

what is a float(float)

decimal point numbers e.g, 4.5

8
New cards

what are comparative operators

syntax. examples

==. equal to

!= not equal to

> greater than

<. less than

>= greater or equal to

<= less or equal to

9
New cards

what is selection

num=int (input("please enter a number"))
if num>10:
print ("too high")
else:
print ("thank you")

if num> 10:
print("too high")
elif num<5:
print ("too low")
else
print ("thank you")

10
New cards

what are text strings

single quoted

'perfect'

double quoted

'credit'