subject

Nstructions When we read code and predict its output, it is called tracing code.

For this lesson, you will come up with your own challenging algorithm for other students to trace. It must contain at least 5 if statements and use at least one AND or OR boolean condition.

Note: Elif or else statements will not count - your statements must be if statements. Each if statement should use a unique
For this challenge, try reading 3 or 4 of your classmates' code as well. Trace their code and predict what it will output, then check the code by running it to see if you got it right, and submit your work for a grade

name = input("What's your name?")

if name == "no" or name == "NO" or name == "name":
print("That's not a name!")
else:
print("Hello " + name)

age = int(input("How old are you?"))

if age < 13:
print("Why are you on the Internet??")
elif age < 18:
print("High school's cool")
else:
print("Wow, a real adult!")

dogs = input("Do you like dogs?")

if dogs == "yes" or dogs == "YES":
fish = input("Do you also like fish?")

if fish == "yes" or fish == "YES":
print("What an animal lover!")
else:
print("Yeah, dogs are great!")
else:
cats = input("What about cats?")

if cats == "no" or cats == "NO":
print("Maybe horses or bunnies?")
else:
print("Cats are cool")

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
You should hand write your references on your resume.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
When working with a team you should always do the following, except? question 3 options: be dependable and trustworthy be sensitive to others feelings do your fair share critique members of the group
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
Jane’s team is using the v-shaped model for their project. during the high-level design phase of the project, testers perform integration testing. what is the purpose of an integration test plan in the v-model of development? a. checks if the team has gathered all the requirements b. checks how the product interacts with external systems c. checks the flow of data in internal modules d. checks how the product works from the client side
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
Lakendra finished working on her monthly report. in looking it over, she saw that it had large blocks of white space. what steps could lakendra take to reduce the amount of white space?
Answers: 3
You know the right answer?
Nstructions When we read code and predict its output, it is called tracing code.

For thi...
Questions
question
Mathematics, 26.09.2019 22:30
Questions on the website: 13722359