我有以下 R 中的 flexdashbard 示例代码:
---
title: "My Dashboard"
runtime: shiny
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
always_allow_html: yes
---
```{r init, include=FALSE, echo=FALSE}
gc()
```
```{r setup1, include = FALSE}
library(flexdashboard)
library(thematic)
library(ggplot2)
library(bslib)
library(shiny)
library(plotly)
library(tidyverse)
library(dplyr)
library(htmltools)
```
Home {data-icon="fa-home" .main}
=====================================
```{r, include=FALSE}
theme_set(theme_bw(base_size = 20))
```
Row
-----------------------------------------------------------------------
### Heading 1
```{r}
valueBox(1, icon = "fa-pencil", color="success")
```
### Heading 2
```{r}
valueBox(2, icon = "fa-file-text-o", color="info")
```
### Heading 3
```{r}
valueBox(3, icon = …
Run Code Online (Sandbox Code Playgroud) 如何求出该数字中每个数字和为13、最后一位数字为5的所有可能的组合?
我正在 python 中尝试如下:
nmz = []
for i in range(1000,10000):
if ((sum(int(j) for j in str(i))==13) & (i % 10)):
nmz = nmz.append(i)
return(nmz)
else:
continue
Run Code Online (Sandbox Code Playgroud)
我收到错误并且无法获得预期的输出:
nmz = [1165, 1345, 1435, 1615, 1705, 2245, 2425, 3055 ..... ]
Run Code Online (Sandbox Code Playgroud)
错误是: