100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

TECHSMART EXAM QUESTIONS AND 100% CORRECT ANSWERS

Rating
-
Sold
-
Pages
10
Grade
A+
Uploaded on
11-06-2025
Written in
2024/2025

TECHSMART EXAM QUESTIONS AND 100% CORRECT ANSWERS....

Institution
TECHSMART
Course
TECHSMART









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
TECHSMART
Course
TECHSMART

Document information

Uploaded on
June 11, 2025
Number of pages
10
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

TECHSMART EXAM QUESTIONS AND 100%
CORRECT ANSWERS




If statement - ANSWER An if statement, or conditional, is a code structure that
makes a decision. It is composed of a line that asks a question, and then one or
more indented lines that run or are skipped based on the answer to that question.

What value is printed out by this code?
x = 100
if x > 0:
x -= 1
print(x) - ANSWER 99

What value is printed out by this code?
x=0
if x < 0:
x += 1
print(x) - ANSWER 0

Fix the error in this code that stops it from running.

user_day = input("Enter a date: ")
day = "September 21"
if day = user_day:
print ("Oh! How did you know the secret date?") - ANSWER user_day =
input("Enter a date: ")
day = "September 21"
if day == user_day:
print ("Oh! How did you know the secret date

Which of the following is true about the decision-making lines (clauses) in
conditionals?

They always contain a keyword and a colon
They always contain a condition

, They are always indented
They are always surrounded by blank lines - ANSWER They always contain a
keyword and a colon

Highlight the condition in the following code. Do not highlight any extra
characters.

my_var = 0
if my_var > 99:
print ("This number has at least 3 digits..") - ANSWER my_var = 0
if my_var > 99:
print ("This number has at least 3 digits..")

What symbol is used in Python to raise one number to the power of another
number? (exponentiation operator)

//
**
%%
++ - ANSWER **

What is the chance that the secret item will be "bell"? Give your answer as a
fraction.

import random
secret = random.randint(1, 6)
if secret == 1:
secret_item = "pin"
elif secret == 2:
secret_item == "toy"
elif secret == 3:
secret_item = "cookie"
else:
secret_item == "bell" - ANSWER 3/6

Replace the _ symbol in the following code with the operator that gets the
remainder after division (modulo).

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
luzlinkuz Chamberlain University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1424
Member since
4 year
Number of followers
849
Documents
27510
Last sold
4 days ago

3.7

302 reviews

5
131
4
60
3
54
2
17
1
40

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions