What is a for loop?
A for-loop (or simply for loop) is a control flow statement for specifying iteration, which allows code to be executed repeatedly. ... For-loops are typically used when the number of iterations is known before entering the loop.
What is a Function?
In programming, a named section of a program that performs a specific task. In this sense, a function is a type of procedure or routine
What is an if statement
An if statement is a programming conditional statement that, if proved true, performs a function or displays information.
What is a List?
is a tool that can be used to store multiple pieces of information at once. It can also be defined as a variable containing multiple other variables. A list consists of a numbers paired with items
Who is Bill Gates?
William Henry Gates III is an American business magnate, software developer, investor, and philanthropist. He is best known as the co-founder of Microsoft Corporation.
What is while loop?
while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement.
import random
random.randint(0, 3)
random.randint(0, 3)
print(random.randint(0, 3))
print(random.randint(0, 3))
print(random.randint(0, 3))
what will it print out when it runs?
0
0
3
what is elif?
The elif statement allows you to check multiple expressions for TRUE and execute a block of code as soon as one of the conditions
What is an item?
An integer is a whole number (not a fraction) that can be positive, negative, or zero. Therefore, the numbers 10, 0, -25, and 5,148 are all integers.
Who is Mark zuckerberg?
Mark Elliot Zuckerberg is an American internet entrepreneur and philanthropist. He co-founded Facebook, Inc. and serves as its chairman, chief executive officer, and controlling shareholder. He also co-founded and is a board member of the solar sail spacecraft development project Breakthrough Starshot
fruits = ["apple", "banana", "cherry"]
for x in fruits:
print(x)
what will it print out when it runs?
apple
banana
cherry
What is Abstraction?
Abstraction is managing the complexity of a program by removing details and pushing them down to a lower level
what is a conditional statement
A conditional statement is a help you to make a decision based on certain conditions. These conditions are specified by a set of conditional statements having boolean expressions which are evaluated to a boolean value true or false.
a = ['a', 'b', 'c', 'd', 'e']
print(a[0:3])
print(a[1:4])
Predict what will be printed.
['a', 'b', 'c']
['b', 'c', 'd']
Who is Larry Page?
Lawrence Edward Page is an American computer scientist and Internet entrepreneur. He is best known for being one of the co-founders of Google along with Sergey Brin. Page was the chief executive officer of Alphabet Inc. until stepping down on December 3, 2019.
for x in "banana":
print(x)
what will it print out when it runs?
b
a
n
a
n
a
What is Demonstration?
In computer science, programming by demonstration (PbD) is an end-user development technique for teaching a computer or a robot new behaviors by demonstrating the task to transfer directly instead of programming it through machine commands.
How many types of conditional statement are there and name them all?
If statement
If-Else statement
Nested If-else statement
If-Else If ladder
Switch statement
what is slicing
Define slicing: a list operation that gives back a list starting from the index to the left of the colon and going up to the index to the right of the colon.
Who is Grace Hopper?
Grace Brewster Murray Hopper was an American computer scientist and United States Navy rear admiral. One of the first programmers of the Harvard Mark I computer, she was a pioneer of computer programming who invented one of the first linkers
i = 1
while i < 6:
print(i)
i += 1
else:
print("i is no longer less than 6")
what will it print out when it runs?
1
2
3
4
5
i is no longer less than 6
What is Debugging and Scope?
Debugging is is the routine process of locating and removing computer program bugs, errors or abnormalities, which is methodically handled by software programmers via debugging tools
Scope refers to the visibility of variables. In other words, which parts of your program can see or use it. Normally, every variable has a global scope. Once defined, every part of your program can access a variable. It is very useful to be able to limit a variable's scope to a single function.
what the plus sign and append do to a list.
Using + creates a new list. The + operation adds the array elements to the original array. The array. append operation inserts the array (or any object) into the end of the original array
a = ['a', 'b', 'c', 'd', 'e']
b = a.append('f')
print(a)
print(b)
['a', 'b', 'c', 'd', 'e', 'f']
None
Who is Yiming Zhang ?
The creator of tiktok, now you must do a ticktock challeenge and use the hashtag #microsoftTeals