Search Header Logo
revision_data_types_BN23

revision_data_types_BN23

Assessment

Presentation

•

Computers

•

9th - 12th Grade

•

Practice Problem

•

Easy

Created by

Brian New

Used 2+ times

FREE Resource

5 Slides • 11 Questions

1

CS revision

media

data types and coding principles

2

Multiple Choice

Spot the odd one out

1

STRING

2

CHAR

3

BOOLEAN

4

RAND

3

Multiple Choice

Spot the odd one out

1

BOOLEAN

2

INTEGER

3

BYTE

4

REAL

4

Multiple Choice

Spot the odd one out

1

INT

2

3.1

3

-3

4

INTEGER

5

Multiple Choice

Spot the odd one out

1

STRING

2

"HELLO WORLD"

3

"3.1"

4

TXT

6

the 5 data types

integer

real

boolean

string

char

7

Poll

Vote for your favourite data type.

(The winner will be elected Prime Minister of data types.)

integer

real

boolean

string

char

8

Fill in the Blanks

The real data type is also known as a

Type answer...

.

9

Fill in the Blanks

A

Type answer...

might be used to control whether a while loop keeps on iterating or finishes.

10

Fill in the Blanks

The

Type answer...

data type, in python, is secretly a list of chars.

11

Fill in the Blanks

Type answer...

means converting one data type to another.

12

casting

import random

x = random.randint(0,100)

print( "Your random score is " + str(x) )

13

casting

print("Welcome to the seconds-alive calculator.")

age = input("Please enter your age > ")

age = int(age)

if age < 0 or age > 120:

print("Invalid age.")

else...

14

Open Ended

Explain what casting is useful for.

15

Open Ended

Explain why you can't cast from any data type to any other.

Use an example to demonstrate what you mean.

16

coding challenge

code your own seconds-alive calculator: user enters age, then calculate how many seconds they have been alive

O) use casting to validate any user inputs

O) use concatenation for building interesting string messages

O) how could you add features? What else would be fun to calculate in this app? Use randomness?

pattern-tertiary
CS revision

media

data types and coding principles

Show answer

Auto Play

Slide 1 / 16

SLIDE